darwin: fix undefined context functions 39/5039/2
authorMatthias Diener <mdiener@illinois.edu>
Fri, 22 Mar 2019 19:25:36 +0000 (14:25 -0500)
committerMatthias Diener <mdiener@illinois.edu>
Fri, 22 Mar 2019 19:28:16 +0000 (14:28 -0500)
Change-Id: I48ede4613a01b872039440b30af19815211a2225

src/conv-core/threads.c

index 2aac77c282154a8730679f9783c22cf44ddd1228..11b8dd47da0f91096c0954f3fb78f84f379d2085 100644 (file)
@@ -1612,9 +1612,11 @@ Gengbin Zheng October, 2007
 /* system builtin context routines: */
 
 #if defined(__APPLE__)
-#include <sys/ucontext.h>
-#else
+#define _XOPEN_SOURCE
+#endif
 #include <ucontext.h>
+#if defined(__APPLE__)
+#undef _XOPEN_SOURCE
 #endif
 
 typedef ucontext_t uJcontext_t;