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>
This commit is contained in:
Thomas Klausner 2016-03-03 16:28:22 +01:00 committed by Takashi Iwai
parent 6defb60ae4
commit 59e4282717
1 changed files with 4 additions and 0 deletions

View File

@ -23,7 +23,11 @@
#ifndef _UAPI__SOUND_ASOUND_H
#define _UAPI__SOUND_ASOUND_H
#if defined(__KERNEL__) || defined(__linux__)
#include <linux/types.h>
#else
#include <sys/ioctl.h>
#endif
#ifndef __KERNEL__
#include <stdlib.h>