From 50d68c83bbbfc5fe8fdc7d26e1025ff208f40b93 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 9 Sep 2012 13:56:57 +0200 Subject: [PATCH] Fixed TinyCThread declaring timespec on OS X. --- support/tinycthread.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support/tinycthread.h b/support/tinycthread.h index 1a9c805c..18451ef9 100644 --- a/support/tinycthread.h +++ b/support/tinycthread.h @@ -104,14 +104,16 @@ freely, subject to the following restrictions: #endif /* Workaround for missing clock_gettime (most Windows compilers, afaik) */ -#if defined(_TTHREAD_WIN32_) +#if defined(_TTHREAD_WIN32_) || defined(__APPLE_CC__) #define _TTHREAD_EMULATE_CLOCK_GETTIME_ /* Emulate struct timespec */ +#if defined(_TTHREAD_WIN32_) struct _ttherad_timespec { time_t tv_sec; long tv_nsec; }; #define timespec _ttherad_timespec +#endif /* Emulate clockid_t */ typedef int _tthread_clockid_t;