From 1d3cf89cbc0ce6fed2f377e1e4eb365602bb33e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Thu, 15 Aug 2013 15:02:24 -0400 Subject: [PATCH] libwinpr-synch: fix wait.c build on Mac OS X --- winpr/libwinpr/synch/wait.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/winpr/libwinpr/synch/wait.c b/winpr/libwinpr/synch/wait.c index a8d9aeff3..dccb071ae 100644 --- a/winpr/libwinpr/synch/wait.c +++ b/winpr/libwinpr/synch/wait.c @@ -105,6 +105,7 @@ DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds) mutex = (WINPR_MUTEX*) Object; +#if _GNU_SOURCE if (dwMilliseconds != INFINITE) { struct timespec timeout; @@ -115,7 +116,10 @@ DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds) pthread_mutex_timedlock(&mutex->mutex, &timeout); } else +#endif + { pthread_mutex_lock(&mutex->mutex); + } } else if (Type == HANDLE_TYPE_EVENT) {