libwinpr-synch: fix wait.c build on Mac OS X

This commit is contained in:
Marc-André Moreau 2013-08-15 15:02:24 -04:00
parent 763d13db43
commit 1d3cf89cbc

View File

@ -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)
{