]> pd.if.org Git - pdclib/blobdiff - opt/pthreads/mtx_timedlock.c
PDCLib includes with quotes, not <>.
[pdclib] / opt / pthreads / mtx_timedlock.c
index ed490a874cf836346d24ecb29badd5896201d5b8..bca1f6a7dd889314064ec4912cb5f081b19d13ec 100644 (file)
@@ -1,15 +1,17 @@
 #ifndef REGTEST
+#define _POSIX_C_SOURCE 2008098L
 #include <threads.h>
 // On Mac OS X, supress system definition of struct timespec
 #ifdef __APPLE__
     #define _STRUCT_TIMESPEC struct timespec
 #endif
 #include <unistd.h>
+#include <errno.h>
 #include <pthread.h>
 
 /* Can only implement if timeouts are supported.
  *
- * Namely, Mac OS X does not implement timeouts 
+ * Namely, Mac OS X does not implement timeouts
  */
 #if defined(_POSIX_TIMEOUTS) && (_POSIX_TIMEOUTS - 200112L) >= 0L
 int mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts)
@@ -28,7 +30,7 @@ int mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts)
 #endif
 
 #ifdef TEST
-#include <_PDCLIB_test.h>
+#include "_PDCLIB_test.h"
 
 int main( void )
 {