Skip to content

Commit 7fd7d6c

Browse files
committed
ALSA: uapi: Fix typos and header inclusion in asound.h
The recent changes in uapi/asoundlib.h caused some build errors in alsa-lib side because of a typo and the new included files. Basically asound.h is supposed to be usable also on non-Linux systems, so we've tried to avoid the Linux-specific include files. This patch is an attempt to recover from those changes. Fixes: 3ddee7f ("ALSA: Avoid using timespec for struct snd_pcm_status") Fixes: 80fe743 ("ALSA: add new 32-bit layout for snd_pcm_mmap_status/control") Link: https://lore.kernel.org/r/20191220153415.2740-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 4fa406c commit 7fd7d6c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎include/uapi/sound/asound.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626

2727
#if defined(__KERNEL__) || defined(__linux__)
2828
#include <linux/types.h>
29+
#include <asm/byteorder.h>
2930
#else
31+
#include <endian.h>
3032
#include <sys/ioctl.h>
3133
#endif
3234

@@ -35,8 +37,6 @@
3537
#include <time.h>
3638
#endif
3739

38-
#include <asm/byteorder.h>
39-
4040
/*
4141
* protocol version
4242
*/
@@ -471,7 +471,7 @@ enum {
471471

472472
#ifndef __KERNEL__
473473
/* explicit padding avoids incompatibility between i386 and x86-64 */
474-
typedef struct { unsigned char pad[sizeof(time_t) - sizeof(int)] __time_pad;
474+
typedef struct { unsigned char pad[sizeof(time_t) - sizeof(int)]; } __time_pad;
475475

476476
struct snd_pcm_status {
477477
snd_pcm_state_t state; /* stream state */

0 commit comments

Comments
 (0)