Skip to content

Commit

Permalink
ALSA: uapi: Make alsa asound.h header more portable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Klausner authored and Takashi Iwai committed Mar 4, 2016
1 parent 6defb60 commit 59e4282
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/uapi/sound/asound.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 59e4282

Please sign in to comment.