diff --git a/lightweightsemaphore.h b/lightweightsemaphore.h index c103068f..199f25fd 100644 --- a/lightweightsemaphore.h +++ b/lightweightsemaphore.h @@ -26,7 +26,7 @@ extern "C" { __declspec(dllimport) unsigned long __stdcall WaitForSingleObject(void* hHandle, unsigned long dwMilliseconds); __declspec(dllimport) int __stdcall ReleaseSemaphore(void* hSemaphore, long lReleaseCount, long* lpPreviousCount); } -#elif defined(__MACH__) +#elif defined(__MACH__) && defined(__APPLE__) #include #elif defined(__MVS__) #include @@ -118,7 +118,7 @@ class Semaphore while (!ReleaseSemaphore(m_hSema, count, nullptr)); } }; -#elif defined(__MACH__) +#elif defined(__MACH__) && defined(__APPLE__) //--------------------------------------------------------- // Semaphore (Apple iOS and OSX) // Can't use POSIX semaphores due to http://lists.apple.com/archives/darwin-kernel/2009/Apr/msg00010.html