aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/alsa-lib/Makefile1
-rw-r--r--audio/gramofile/Makefile1
-rw-r--r--audio/wavplay/Makefile2
-rw-r--r--audio/xmcd/Makefile2
-rw-r--r--audio/zinf/Makefile1
-rw-r--r--benchmarks/super-smack/Makefile1
-rw-r--r--databases/fastdb/Makefile1
-rw-r--r--deskutils/fusenshi/Makefile1
-rw-r--r--devel/ace/Makefile1
-rw-r--r--devel/libmba/Makefile1
-rw-r--r--devel/libshbuf/Makefile1
-rw-r--r--devel/nspr/Makefile1
-rw-r--r--devel/poco-ssl/Makefile1
-rw-r--r--devel/shmap/Makefile1
-rw-r--r--emulators/qemu-sbruno/Makefile1
-rw-r--r--emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_nsprpub_pr_src_pthreads_ptsynch.c22
-rw-r--r--ftp/gftp/Makefile1
-rw-r--r--lang/cint/files/patch-cint_lib_ipc_ipcif.h20
-rw-r--r--lang/ferite/Makefile1
-rw-r--r--lang/rexx-regutil/Makefile1
-rw-r--r--mail/batv-milter/Makefile1
-rw-r--r--mail/batv-milter/files/patch-include_sm_os_sm__os__freebsd.h14
-rw-r--r--mail/dk-milter/files/patch-include_sm_os_sm__os__freebsd.h14
-rw-r--r--mail/sendmail/files/patch-include_sm_os_sm__os__freebsd.h14
-rw-r--r--mail/sid-milter/files/patch-include_sm_os_sm__os__freebsd.h14
-rw-r--r--misc/buffer/Makefile1
-rw-r--r--multimedia/py-kaa-base/Makefile1
-rw-r--r--net-mgmt/sdig/Makefile1
-rw-r--r--net-p2p/monero-cli/Makefile1
-rw-r--r--sysutils/freeipmi/Makefile1
-rw-r--r--sysutils/symon/Makefile1
-rw-r--r--www/mod_cband/files/patch-src_mod__cband.c27
32 files changed, 152 insertions, 0 deletions
diff --git a/audio/alsa-lib/Makefile b/audio/alsa-lib/Makefile
index e58627696bab..b2c75983e0f1 100644
--- a/audio/alsa-lib/Makefile
+++ b/audio/alsa-lib/Makefile
@@ -23,6 +23,7 @@ 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/gramofile/Makefile b/audio/gramofile/Makefile
index cc2dcff13d52..6468c23a0fdd 100644
--- a/audio/gramofile/Makefile
+++ b/audio/gramofile/Makefile
@@ -22,6 +22,7 @@ USE_CSTD= gnu89
MAKE_ARGS= CC="${CC}" \
CXX="${CXX}" \
PERLCOREDIR=${PERLCOREDIR}
+CFLAGS+= -D_WANT_SEMUN
PERLCOREDIR= ${LOCALBASE}/lib/perl5/${PERL_VER}/${PERL_ARCH}/CORE
diff --git a/audio/wavplay/Makefile b/audio/wavplay/Makefile
index 1dd9adbb964d..ceca415b2b18 100644
--- a/audio/wavplay/Makefile
+++ b/audio/wavplay/Makefile
@@ -13,6 +13,8 @@ COMMENT= Wav player and recorder
LICENSE= GPLv2 # only
LICENSE_FILE= ${WRKSRC}/COPYING
+CFLAGS+= -D_WANT_SEMUN
+
ONLY_FOR_ARCHS= amd64 armv6 armv7 i386
INSTALL_TARGET= install PREFIX="${STAGEDIR}${PREFIX}"
diff --git a/audio/xmcd/Makefile b/audio/xmcd/Makefile
index a028f342ccff..0bb1f71b10fe 100644
--- a/audio/xmcd/Makefile
+++ b/audio/xmcd/Makefile
@@ -20,6 +20,8 @@ PLIST_SUB+= RELEASE=${OSREL:R:R} ARCH=${ARCH} OPSYS=${OPSYS}
SUB_FILES= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
+CFLAGS+= -D_WANT_SEMUN
+
LIBBINDIR= ${STAGEDIR}${PREFIX}/lib/X11/xmcd/bin-${OPSYS}_${OSREL:R:R}-${ARCH}
BROKEN_aarch64= Fails to compile: many undefined symbols in xorg.cf
diff --git a/audio/zinf/Makefile b/audio/zinf/Makefile
index 5f55ea3f655b..eadf8fc802bb 100644
--- a/audio/zinf/Makefile
+++ b/audio/zinf/Makefile
@@ -20,6 +20,7 @@ CONFIGURE_ARGS= --enable-ipv6 \
--disable-arts
CPPFLAGS+= -I${LOCALBASE}/include
+CPPFLAGS+= -D_WANT_SEMUN
LDFLAGS+= -lpthread -L${LOCALBASE}/lib
OPTIONS_DEFINE= ESOUND VORBIS
diff --git a/benchmarks/super-smack/Makefile b/benchmarks/super-smack/Makefile
index 3b006ea560a1..affe6cd681a6 100644
--- a/benchmarks/super-smack/Makefile
+++ b/benchmarks/super-smack/Makefile
@@ -15,6 +15,7 @@ LICENSE= GPLv2+
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-smacks-dir=${DATADIR}
MAKE_JOBS_UNSAFE= yes
+CPPFLAGS+= -D_WANT_SEMUN
PORTDOCS= CHANGES README MANUAL TUTORIAL
diff --git a/databases/fastdb/Makefile b/databases/fastdb/Makefile
index 00815d84ff6f..ad5ef89c503f 100644
--- a/databases/fastdb/Makefile
+++ b/databases/fastdb/Makefile
@@ -22,6 +22,7 @@ MAKE_ENV= OSTYPE="${OPSYS}"
MAKEFILE= makefile
USE_LDCONFIG= yes
DOS2UNIX_FILES= ${MAKEFILE}
+CXXFLAGS+= -D_WANT_SEMUN
PORTDOCS= FastDB.htm
diff --git a/deskutils/fusenshi/Makefile b/deskutils/fusenshi/Makefile
index 10453a868247..e22f32b2da4d 100644
--- a/deskutils/fusenshi/Makefile
+++ b/deskutils/fusenshi/Makefile
@@ -15,6 +15,7 @@ USE_CXXSTD= c++11
USE_GNOME= gtkmm24 gtksourceview libxml2
USE_XORG= x11
MAKE_JOBS_UNSAFE= yes
+CXXFLAGS+= -D_WANT_SEMUN
.ifdef WITHOUT_SSL
MAKE_ARGS+= WITHOUT_SSL=yes
diff --git a/devel/ace/Makefile b/devel/ace/Makefile
index 6b21ba26bdf1..98e249852e80 100644
--- a/devel/ace/Makefile
+++ b/devel/ace/Makefile
@@ -27,6 +27,7 @@ MAKEFILE= GNUmakefile
USE_LDCONFIG= yes
CPPFLAGS+= -I${LOCALBASE}/include
+CPPFLAGS+= -D_WANT_SEMUN
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_SUB= VERSION="${PORTVERSION}"
diff --git a/devel/libmba/Makefile b/devel/libmba/Makefile
index e4833ea91697..455b2f090c81 100644
--- a/devel/libmba/Makefile
+++ b/devel/libmba/Makefile
@@ -14,6 +14,7 @@ COMMENT= Collection of C modules potentially useful to any project
MAKE_JOBS_UNSAFE= yes
USE_LDCONFIG= yes
MAKE_ARGS= prefix="${STAGEDIR}${PREFIX}"
+CFLAGS+= -D_WANT_SEMUN
post-patch:
@${REINPLACE_CMD} -e 's,-g,$$(CFLAGS),' \
diff --git a/devel/libshbuf/Makefile b/devel/libshbuf/Makefile
index 077946836c6f..1c7eb304cceb 100644
--- a/devel/libshbuf/Makefile
+++ b/devel/libshbuf/Makefile
@@ -16,5 +16,6 @@ USES= pathfix libtool
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--disable-lynx --disable-doxygen
INSTALL_TARGET= install-strip
+CFLAGS+= -D_WANT_SEMUN
.include <bsd.port.mk>
diff --git a/devel/nspr/Makefile b/devel/nspr/Makefile
index aed3ec428e99..31506613d169 100644
--- a/devel/nspr/Makefile
+++ b/devel/nspr/Makefile
@@ -18,6 +18,7 @@ CPE_PRODUCT= netscape_portable_runtime
WRKSRC_SUBDIR= nspr
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
+CFLAGS+= -D_WANT_SEMUN
OPTIONS_DEFINE= DEBUG TEST
diff --git a/devel/poco-ssl/Makefile b/devel/poco-ssl/Makefile
index e0cfa38a44da..436fd382d538 100644
--- a/devel/poco-ssl/Makefile
+++ b/devel/poco-ssl/Makefile
@@ -25,6 +25,7 @@ USES= gmake tar:bzip2 ssl
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} --config=FreeBSD
USE_LDCONFIG= yes
+CXXFLAGS+= -D_WANT_SEMUN
OPTIONS_DEFINE= TEST SAMPLES MYSQL SQLITE ODBC
OPTIONS_DEFAULT=MYSQL SQLITE
diff --git a/devel/shmap/Makefile b/devel/shmap/Makefile
index 468a6080efa2..95e4a949f34c 100644
--- a/devel/shmap/Makefile
+++ b/devel/shmap/Makefile
@@ -17,6 +17,7 @@ GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USE_LDCONFIG= yes
+CPPFLAGS+= -D_WANT_SEMUN
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libshmap.so
diff --git a/emulators/qemu-sbruno/Makefile b/emulators/qemu-sbruno/Makefile
index 632bca6a9869..7b32e4e43fab 100644
--- a/emulators/qemu-sbruno/Makefile
+++ b/emulators/qemu-sbruno/Makefile
@@ -131,6 +131,7 @@ PLIST_SUB+= STATIC=""
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//}
CFLAGS+= -Wno-address-of-packed-member
+CFLAGS+= -D_WANT_SEMUN
CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} --enable-docs \
--disable-linux-user --disable-linux-aio \
--disable-kvm --disable-xen \
diff --git a/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_nsprpub_pr_src_pthreads_ptsynch.c b/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_nsprpub_pr_src_pthreads_ptsynch.c
new file mode 100644
index 000000000000..b0647fa9d17d
--- /dev/null
+++ b/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_nsprpub_pr_src_pthreads_ptsynch.c
@@ -0,0 +1,22 @@
+--- src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptsynch.c.orig
++++ src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptsynch.c
+@@ -49,6 +49,9 @@
+ #include <string.h>
+ #include <pthread.h>
+ #include <sys/time.h>
++#ifdef FREEBSD
++#include <sys/param.h>
++#endif
+
+ static pthread_mutexattr_t _pt_mattr;
+ static pthread_condattr_t _pt_cvar_attr;
+@@ -798,7 +801,8 @@
+ * From the semctl(2) man page in glibc 2.0
+ */
+ #if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \
+- || defined(FREEBSD) || defined(OPENBSD) || defined(BSDI)
++ || (defined(FREEBSD) && __FreeBSD_version < 1200059) \
++ || defined(OPENBSD) || defined(BSDI)
+ /* union semun is defined by including <sys/sem.h> */
+ #else
+ /* according to X/OPEN we have to define it ourselves */
diff --git a/ftp/gftp/Makefile b/ftp/gftp/Makefile
index 551722073df5..c1d7ab95e8c7 100644
--- a/ftp/gftp/Makefile
+++ b/ftp/gftp/Makefile
@@ -15,6 +15,7 @@ LICENSE= GPLv2
USES= pathfix pkgconfig tar:bzip2 ssl
GNU_CONFIGURE= yes
USE_GNOME= glib20 gtk20
+CFLAGS+= -D_WANT_SEMUN
OPTIONS_DEFINE= NLS
OPTIONS_SUB= yes
diff --git a/lang/cint/files/patch-cint_lib_ipc_ipcif.h b/lang/cint/files/patch-cint_lib_ipc_ipcif.h
new file mode 100644
index 000000000000..20b058d21919
--- /dev/null
+++ b/lang/cint/files/patch-cint_lib_ipc_ipcif.h
@@ -0,0 +1,20 @@
+--- cint/lib/ipc/ipcif.h.orig
++++ cint/lib/ipc/ipcif.h
+@@ -28,13 +28,16 @@
+ #include <sys/ipc.h>
+ #include <sys/shm.h>
+ #include <sys/sem.h>
++#ifdef __FreeBSD__
++#include <sys/param.h>
++#endif
+ #if defined(G__APPLE) || defined(__APPLE__)
+ /* union semun is defined by including <sys/sem.h> */
+ #elif defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
+ /* union semun is defined by including <sys/sem.h> */
+ #else
+ /* according to X/OPEN we have to define it ourselves */
+-#if !defined(__FreeBSD__) && !defined(__KCC) && !defined(__sgi)
++#if (!defined(__FreeBSD__) || __FreeBSD_version >= 1200059) && !defined(__KCC) && !defined(__sgi)
+ union semun {
+ int val; /* value for SETVAL */
+ struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */
diff --git a/lang/ferite/Makefile b/lang/ferite/Makefile
index 222af9ceb903..5851d15e3027 100644
--- a/lang/ferite/Makefile
+++ b/lang/ferite/Makefile
@@ -23,6 +23,7 @@ LDFLAGS+= -lpthread -L${LOCALBASE}/lib
USE_LDCONFIG= yes
PLIST_SUB= MACHINE_ARCH=${MACHINE_ARCH}
INSTALL_TARGET= install-strip
+CFLAGS+= -D_WANT_SEMUN
PORTDOCS= *
diff --git a/lang/rexx-regutil/Makefile b/lang/rexx-regutil/Makefile
index cff43460d1e1..18c700a4aa18 100644
--- a/lang/rexx-regutil/Makefile
+++ b/lang/rexx-regutil/Makefile
@@ -24,6 +24,7 @@ USE_LDCONFIG= yes
LLD_UNSAFE= yes # lld lacks built-in search paths
MAKEFILE= Makefile.bsd
MAKE_ARGS+= PLIBS="${LDFLAGS:M-L*} -lncurses"
+CFLAGS+= -D_WANT_SEMUN
SUB_FILES= regutil.1
diff --git a/mail/batv-milter/Makefile b/mail/batv-milter/Makefile
index 4b47d3bda8bd..056bb96ae3b6 100644
--- a/mail/batv-milter/Makefile
+++ b/mail/batv-milter/Makefile
@@ -18,6 +18,7 @@ USES= uidfix ssl
USE_RC_SUBR= milter-batv
MAKE_ARGS= UBINOWN=${UID} UBINGRP=${GID}
+CFLAGS+= -D_WANT_SEMUN
WCONF= ${WRKSRC}/devtools/Site
PLIST_FILES= bin/batv-filter man/man8/batv-filter.8.gz
diff --git a/mail/batv-milter/files/patch-include_sm_os_sm__os__freebsd.h b/mail/batv-milter/files/patch-include_sm_os_sm__os__freebsd.h
new file mode 100644
index 000000000000..427c6d1c3a15
--- /dev/null
+++ b/mail/batv-milter/files/patch-include_sm_os_sm__os__freebsd.h
@@ -0,0 +1,14 @@
+--- include/sm/os/sm_os_freebsd.h.orig
++++ include/sm/os/sm_os_freebsd.h
+@@ -34,7 +34,11 @@
+ # define SM_CONF_SHM 1
+ #endif /* SM_CONF_SHM */
+ #ifndef SM_CONF_SEM
++#if __FreeBSD_version < 1200059
+ # define SM_CONF_SEM 1
++#else
++# define SM_CONF_SEM 2
++#endif
+ #endif /* SM_CONF_SEM */
+ #ifndef SM_CONF_MSG
+ # define SM_CONF_MSG 1
diff --git a/mail/dk-milter/files/patch-include_sm_os_sm__os__freebsd.h b/mail/dk-milter/files/patch-include_sm_os_sm__os__freebsd.h
new file mode 100644
index 000000000000..427c6d1c3a15
--- /dev/null
+++ b/mail/dk-milter/files/patch-include_sm_os_sm__os__freebsd.h
@@ -0,0 +1,14 @@
+--- include/sm/os/sm_os_freebsd.h.orig
++++ include/sm/os/sm_os_freebsd.h
+@@ -34,7 +34,11 @@
+ # define SM_CONF_SHM 1
+ #endif /* SM_CONF_SHM */
+ #ifndef SM_CONF_SEM
++#if __FreeBSD_version < 1200059
+ # define SM_CONF_SEM 1
++#else
++# define SM_CONF_SEM 2
++#endif
+ #endif /* SM_CONF_SEM */
+ #ifndef SM_CONF_MSG
+ # define SM_CONF_MSG 1
diff --git a/mail/sendmail/files/patch-include_sm_os_sm__os__freebsd.h b/mail/sendmail/files/patch-include_sm_os_sm__os__freebsd.h
new file mode 100644
index 000000000000..427c6d1c3a15
--- /dev/null
+++ b/mail/sendmail/files/patch-include_sm_os_sm__os__freebsd.h
@@ -0,0 +1,14 @@
+--- include/sm/os/sm_os_freebsd.h.orig
++++ include/sm/os/sm_os_freebsd.h
+@@ -34,7 +34,11 @@
+ # define SM_CONF_SHM 1
+ #endif /* SM_CONF_SHM */
+ #ifndef SM_CONF_SEM
++#if __FreeBSD_version < 1200059
+ # define SM_CONF_SEM 1
++#else
++# define SM_CONF_SEM 2
++#endif
+ #endif /* SM_CONF_SEM */
+ #ifndef SM_CONF_MSG
+ # define SM_CONF_MSG 1
diff --git a/mail/sid-milter/files/patch-include_sm_os_sm__os__freebsd.h b/mail/sid-milter/files/patch-include_sm_os_sm__os__freebsd.h
new file mode 100644
index 000000000000..427c6d1c3a15
--- /dev/null
+++ b/mail/sid-milter/files/patch-include_sm_os_sm__os__freebsd.h
@@ -0,0 +1,14 @@
+--- include/sm/os/sm_os_freebsd.h.orig
++++ include/sm/os/sm_os_freebsd.h
+@@ -34,7 +34,11 @@
+ # define SM_CONF_SHM 1
+ #endif /* SM_CONF_SHM */
+ #ifndef SM_CONF_SEM
++#if __FreeBSD_version < 1200059
+ # define SM_CONF_SEM 1
++#else
++# define SM_CONF_SEM 2
++#endif
+ #endif /* SM_CONF_SEM */
+ #ifndef SM_CONF_MSG
+ # define SM_CONF_MSG 1
diff --git a/misc/buffer/Makefile b/misc/buffer/Makefile
index f589fbf7a6c4..53be1885dc05 100644
--- a/misc/buffer/Makefile
+++ b/misc/buffer/Makefile
@@ -13,6 +13,7 @@ COMMENT= Buffer sporadic I/O for faster tape and pipe throughput
USES= tar:tgz
PLIST_FILES= bin/buffer \
man/man1/buffer.1.gz
+CFLAGS+= -D_WANT_SEMUN
post-patch:
@${REINPLACE_CMD} -E \
diff --git a/multimedia/py-kaa-base/Makefile b/multimedia/py-kaa-base/Makefile
index 2d6b552bc8b9..3552b32c2d6c 100644
--- a/multimedia/py-kaa-base/Makefile
+++ b/multimedia/py-kaa-base/Makefile
@@ -18,5 +18,6 @@ RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= python:2.7
USE_GNOME= glib20
USE_PYTHON= distutils autoplist
+CFLAGS+= -D_WANT_SEMUN
.include <bsd.port.mk>
diff --git a/net-mgmt/sdig/Makefile b/net-mgmt/sdig/Makefile
index 7242aff19d2a..36eff72a098a 100644
--- a/net-mgmt/sdig/Makefile
+++ b/net-mgmt/sdig/Makefile
@@ -15,6 +15,7 @@ LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
USES= gmake
GNU_CONFIGURE= yes
+CFLAGS+= -D_WANT_SEMUN
PLIST_FILES= bin/sdig etc/sdig.conf etc/mactable man/man5/sdig.conf.5.gz \
man/man8/sdig.8.gz
diff --git a/net-p2p/monero-cli/Makefile b/net-p2p/monero-cli/Makefile
index f462ab10f432..fe7e415acd60 100644
--- a/net-p2p/monero-cli/Makefile
+++ b/net-p2p/monero-cli/Makefile
@@ -30,6 +30,7 @@ USES= cmake compiler:c++11-lib pkgconfig readline ssl
USE_GITHUB= yes
GH_ACCOUNT= monero-project
GH_PROJECT= monero
+CFLAGS+= -D_WANT_SEMUN
OPTIONS_DEFINE= DOXYGEN
DOXYGEN_BUILD_DEPENDS= dot:graphics/graphviz \
diff --git a/sysutils/freeipmi/Makefile b/sysutils/freeipmi/Makefile
index 766cd2446a32..172c3d12975a 100644
--- a/sysutils/freeipmi/Makefile
+++ b/sysutils/freeipmi/Makefile
@@ -36,6 +36,7 @@ CONFIGURE_ENV= PTHREAD_LIBS=-lpthread ac_cv_path_CPP=${CPP}
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
USES= gmake libtool localbase shebangfix
+CFLAGS+= -D_WANT_SEMUN
INFO= freeipmi-faq
PLIST_SUB= CACHE_DIR=${CACHE_DIR}
diff --git a/sysutils/symon/Makefile b/sysutils/symon/Makefile
index 6949e92e695c..2d06d8e7b0bd 100644
--- a/sysutils/symon/Makefile
+++ b/sysutils/symon/Makefile
@@ -16,6 +16,7 @@ USES= groff perl5 shebangfix
SHEBANG_FILES= client/getsymonitem.pl
USE_PERL5= build
MAKE_JOBS_UNSAFE= yes
+CFLAGS+= -D_WANT_SEMUN
USERS= _symon
GROUPS= _symon
diff --git a/www/mod_cband/files/patch-src_mod__cband.c b/www/mod_cband/files/patch-src_mod__cband.c
new file mode 100644
index 000000000000..3b86f3fd7e13
--- /dev/null
+++ b/www/mod_cband/files/patch-src_mod__cband.c
@@ -0,0 +1,27 @@
+--- src/mod_cband.c.orig
++++ src/mod_cband.c
+@@ -56,6 +56,9 @@
+ #include <sys/types.h>
+ #include <sys/ipc.h>
+ #include <sys/sem.h>
++#ifdef __FreeBSD__
++#include <sys/param.h>
++#endif
+ #include <unistd.h>
+
+ #include "mod_cband.h"
+@@ -74,6 +77,14 @@
+ }
+ #endif
+
++#if defined(__FreeBSD__) && __FreeBSD_version >= 1200059
++union semun {
++ int val; /* value for SETVAL */
++ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
++ u_short *array; /* array for GETALL & SETALL */
++};
++#endif
++
+ static mod_cband_config_header *config = NULL;
+ static const char mod_cband_filter_name[] = "CBAND_FILTER";
+ ap_filter_rec_t *mod_cband_output_filter_handle;