c11: Do not use pthread_mutex_timedlock on NetBSD.
authorVinson Lee <vlee@freedesktop.org>
Fri, 24 Jan 2014 23:35:18 +0000 (15:35 -0800)
committerVinson Lee <vlee@freedesktop.org>
Sat, 25 Jan 2014 02:20:42 +0000 (18:20 -0800)
This patch fixes the NetBSD build.

NetBSD does not have pthread_mutex_timedlock.

  CC       glapi_dispatch.lo
threads_posix.h: In function 'mtx_timedlock':
threads_posix.h:216:5: error: implicit declaration of function 'pthread_mutex_timedlock'

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
include/c11/threads_posix.h

index e54af39..7e96715 100644 (file)
@@ -41,7 +41,7 @@ Configuration macro:
     Use pthread_mutex_timedlock() for `mtx_timedlock()'
     Otherwise use mtx_trylock() + *busy loop* emulation.
 */
-#if !defined(__CYGWIN__) && !defined(__APPLE__)
+#if !defined(__CYGWIN__) && !defined(__APPLE__) && !defined(__NetBSD__)
 #define EMULATED_THREADS_USE_NATIVE_TIMEDLOCK
 #endif