]> git.lizzy.rs Git - minetest.git/blobdiff - src/jthread/jevent.h
OS X compatibility fixes
[minetest.git] / src / jthread / jevent.h
index d31d8e654a193d0b8ef0b2745bafe49d041cfb3b..f97e09ca007a0359d3fef80441509d2f670aa791 100644 (file)
 
 #ifdef _WIN32
 #include <windows.h>
+#elif __MACH__
+#include <mach/mach.h>
+#include <mach/task.h>
+#include <mach/semaphore.h>
+#include <sys/semaphore.h>
 #else
 #include <semaphore.h>
 #endif
@@ -38,6 +43,8 @@
 class Event {
 #ifdef _WIN32
        HANDLE hEvent;
+#elif __MACH__
+       semaphore_t sem;
 #else
        sem_t sem;
 #endif