Bug 1444953 - Unbreak build on FreeBSD 12 or later. r=kaie
authorJan Beich <jbeich@FreeBSD.org>
Thu, 15 Mar 2018 21:20:31 +0100
changeset 4786 776db96f834cb86e8863052201d55f60a2da91cb
parent 4785 c6adef8e66749a07775795b3de8af0cf52b417cb
child 4787 f47871e2aeb16b39d4f516690e25c81b04d6d05a
push id294
push userkaie@kuix.de
push dateThu, 15 Mar 2018 20:19:37 +0000
reviewerskaie
bugs1444953
Bug 1444953 - Unbreak build on FreeBSD 12 or later. r=kaie
pr/src/pthreads/ptsynch.c
--- a/pr/src/pthreads/ptsynch.c
+++ b/pr/src/pthreads/ptsynch.c
@@ -906,17 +906,18 @@ PR_IMPLEMENT(PRStatus) PR_DeleteSemaphor
 
 #include <fcntl.h>
 #include <sys/sem.h>
 
 /*
  * 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) \
     || defined(DARWIN) || defined(SYMBIAN)
 /* union semun is defined by including <sys/sem.h> */
 #else
 /* according to X/OPEN we have to define it ourselves */
 union semun {
     int val;
     struct semid_ds *buf;
     unsigned short  *array;