Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: uapi: Make alsa asound.h header more portable

This header is used as-is in the alsa-lib userland library,
which is portable to other operating systems.
For this reason, include linux/types.h only on Linux systems.

Add sys/ioctl.h for _IOR/_IOW/etc. (works at least on *BSD and Solaris).

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Thomas Klausner and committed by
Takashi Iwai
59e42827 6defb60a

+4
+4
include/uapi/sound/asound.h
··· 23 23 #ifndef _UAPI__SOUND_ASOUND_H 24 24 #define _UAPI__SOUND_ASOUND_H 25 25 26 + #if defined(__KERNEL__) || defined(__linux__) 26 27 #include <linux/types.h> 28 + #else 29 + #include <sys/ioctl.h> 30 + #endif 27 31 28 32 #ifndef __KERNEL__ 29 33 #include <stdlib.h>