diff --git a/audio/alsa-lib/Makefile b/audio/alsa-lib/Makefile index b2c75983e0f1..e58627696bab 100644 --- a/audio/alsa-lib/Makefile +++ b/audio/alsa-lib/Makefile @@ -23,7 +23,6 @@ INSTALL_TARGET= install-strip TEST_ENV= ${MAKE_ENV} ALSA_CONFIG_PATH="${FILESDIR}/asound.conf.sample" TEST_TARGET= check CPPFLAGS+= -I${FILESDIR} -CPPFLAGS+= -D_WANT_SEMUN OPTIONS_DEFINE= PYTHON OPTIONS_SUB= yes diff --git a/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c b/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c index 02e5d5e4ade6..ec8600e63c9d 100644 --- a/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c +++ b/audio/alsa-lib/files/patch-src_pcm_pcm__direct.c @@ -1,17 +1,18 @@ --- src/pcm/pcm_direct.c.orig 2016-03-31 13:10:39 UTC +++ src/pcm/pcm_direct.c -@@ -44,12 +44,16 @@ +@@ -44,12 +44,17 @@ * */ -+#if defined(__NetBSD__) -+typedef __semun semun; -+#elif !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) ++#if !defined(__DragonFly__) && !defined(__OpenBSD__) \ ++ && !(defined(__FreeBSD__) && __FreeBSD__ < 12) union semun { int val; /* Value for SETVAL */ struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ unsigned short *array; /* Array for GETALL, SETALL */ ++#ifdef __linux__ struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */ ++#endif }; +#endif