Modified code to use bulitin pthread functions on OpenBSD
authorBryan Everly <bryan@bceassociates.com>
Tue, 21 Apr 2015 20:14:56 +0000 (16:14 -0400)
committerBryan Everly <bryan@bceassociates.com>
Tue, 21 Apr 2015 20:14:56 +0000 (16:14 -0400)
CMakeLists.txt
winpr/libwinpr/synch/wait.c

index 599c7a7..f4c9141 100644 (file)
@@ -376,6 +376,7 @@ if(OPENBSD)
        set(WITH_ALSA  "OFF")
        set(WITH_PULSE "ON")
        set(WITH_WAYLAND "OFF")
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_PTHREAD_GNU_EXT")
 endif()
 
 # Android
index 18c1d05..5fa5e83 100644 (file)
@@ -109,7 +109,7 @@ static long long ts_difftime(const struct timespec *o,
 #if !defined(HAVE_PTHREAD_GNU_EXT)
 #include <pthread.h>
 
-#if defined(__FreeBSD__) || defined(sun) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(sun)
 /*the only way to get it work is to remove the static*/
 int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *timeout)
 #else