From 909de2213ed3a20327635965d69dd905e8906e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 17 Oct 2015 00:20:33 +0200 Subject: Fix conditionals for detecting OSX --- c_src/nif_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/nif_helpers.c b/c_src/nif_helpers.c index 0528b35..d76f1b5 100644 --- a/c_src/nif_helpers.c +++ b/c_src/nif_helpers.c @@ -168,7 +168,7 @@ void* nif_create_main_thread(char* name) st->mailbox = (nif_thread_mailbox*)enif_alloc(sizeof(nif_thread_mailbox)); TAILQ_INIT(st->mailbox); -#ifdef __DARWIN__ +#if defined(__APPLE__) && defined(__MACH__) // On OSX, SDL2 must run in the main thread, otherwise some operations // will not work properly. For example, input events would not be received. erl_drv_steal_main_thread(name, &(st->tid), nif_main_thread, st, NULL); -- cgit v1.2.3