From: Takashi Iwai Subject: Re: [PATCH] Make alsa asound.h header more portable. Date: Thu, 03 Mar 2016 16:21:32 +0100 Message-ID: References: <1457014899-19669-1-git-send-email-tk@giga.or.at> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 282CF2606D2 for ; Thu, 3 Mar 2016 16:21:33 +0100 (CET) In-Reply-To: <1457014899-19669-1-git-send-email-tk@giga.or.at> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Thomas Klausner Cc: alsa-devel@alsa-project.org, Thomas Klausner List-Id: alsa-devel@alsa-project.org On Thu, 03 Mar 2016 15:21:39 +0100, Thomas Klausner wrote: > > From: Thomas Klausner > > 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. This is needed also for building the Linux kernel. So... > Add sys/ioctl.h for _IOR/_IOW/etc. (works at least on *BSD and Solaris). > > Signed-off-by: Thomas Klausner > --- > include/uapi/sound/asound.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h > index a82108e..3d581b5 100644 > --- a/include/uapi/sound/asound.h > +++ b/include/uapi/sound/asound.h > @@ -23,7 +23,11 @@ > #ifndef _UAPI__SOUND_ASOUND_H > #define _UAPI__SOUND_ASOUND_H > > +#ifdef __linux__ ... the following might be better. #if defined(__KERNEL__) || defined(__linux__) At least the same style is found in include/uapi/drm/drm.h, too. thanks, Takashi