Skip to content

Commit

Permalink
ALSA: uapi: Fix typos and header inclusion in asound.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Dec 20, 2019
1 parent 4fa406c commit 7fd7d6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/uapi/sound/asound.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@

#if defined(__KERNEL__) || defined(__linux__)
#include <linux/types.h>
#include <asm/byteorder.h>
#else
#include <endian.h>
#include <sys/ioctl.h>
#endif

Expand All @@ -35,8 +37,6 @@
#include <time.h>
#endif

#include <asm/byteorder.h>

/*
* protocol version
*/
Expand Down Expand Up @@ -471,7 +471,7 @@ enum {

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

struct snd_pcm_status {
snd_pcm_state_t state; /* stream state */
Expand Down

0 comments on commit 7fd7d6c

Please sign in to comment.