changeset 4986:31e37170bcb2

. Fix compilation on FreeBSD 9.x and higher where sem_t is typedef'ed as a struct rather than a pointer.
author Greg Lewis <glewis@eyesbeyond.com>
date Sat, 07 Dec 2013 18:34:06 -0800
parents 54995aa29dbb
children 354aa4d10179
files src/os/bsd/vm/os_bsd.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/bsd/vm/os_bsd.cpp	Wed Dec 04 22:06:37 2013 -0800
+++ b/src/os/bsd/vm/os_bsd.cpp	Sat Dec 07 18:34:06 2013 -0800
@@ -2755,7 +2755,11 @@
     os_semaphore_t _semaphore;
 };
 
+#if defined(__FreeBSD__) && __FreeBSD__ > 8
+Semaphore::Semaphore() : _semaphore() {
+#else
 Semaphore::Semaphore() : _semaphore(0) {
+#endif
   SEM_INIT(_semaphore, 0);
 }