audio/alsa-lib: drop _WANT_SEMUN

This commit is contained in:
Jan Beich 2018-03-13 14:11:42 +00:00
parent 10b715ef81
commit d0b84518f8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=464376
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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