From 079d15d5183358e5b36d0545a4a6756159831d05 Mon Sep 17 00:00:00 2001 From: martell Date: Wed, 4 Feb 2015 05:11:18 +0000 Subject: [PATCH] libobs: mingw-w64 threading-posix Enable support for mingw-w64 in threading-posix.c --- libobs/util/threading-posix.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libobs/util/threading-posix.c b/libobs/util/threading-posix.c index 4d39bf39d..720cfbc07 100644 --- a/libobs/util/threading-posix.c +++ b/libobs/util/threading-posix.c @@ -14,8 +14,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__MINGW32__) #include +#endif +#ifdef __APPLE__ #include #include #include @@ -100,7 +102,7 @@ int os_event_timedwait(os_event_t *event, unsigned long milliseconds) pthread_mutex_lock(&event->mutex); if (!event->signalled) { struct timespec ts; -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__MINGW32__) struct timeval tv; gettimeofday(&tv, NULL); ts.tv_sec = tv.tv_sec; @@ -252,9 +254,9 @@ long os_atomic_dec_long(volatile long *val) void os_set_thread_name(const char *name) { -#ifdef __APPLE__ +#if defined(__APPLE__) pthread_setname_np(name); -#else +#elif !defined(__MINGW32__) pthread_setname_np(pthread_self(), name); #endif }