Commit 9249a2b2 authored by Michael M's avatar Michael M Committed by Dylan Baker

third_party/threads: allow building for macOS

Signed-off-by: default avatarMichael M <mchtly@gmail.com>
Fixes #2
parent 898ed4d7
......@@ -86,7 +86,7 @@ typedef struct once_flag_t {
} once_flag;
#endif
#elif defined(__unix__) || defined(__unix)
#elif defined(__unix__) || defined(__unix) || defined(__APPLE__)
#include <pthread.h>
/*---------------------------- macros ----------------------------*/
......
......@@ -45,7 +45,7 @@ Configuration macro:
Use pthread_mutex_timedlock() for `mtx_timedlock()'
Otherwise use mtx_trylock() + *busy loop* emulation.
*/
#if !defined(__CYGWIN__) && !defined(ANDROID)
#if !defined(__CYGWIN__) && !defined(ANDROID) && !defined(__APPLE__)
#define EMULATED_THREADS_USE_NATIVE_TIMEDLOCK
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment