Bläddra i källkod

ucontext.h seems to be deprecated in Snow Leopard, so let's include sys/ucontext.h there

rdb 15 år sedan
förälder
incheckning
93c6b27e70
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      panda/src/pipeline/contextSwitch.c

+ 4 - 0
panda/src/pipeline/contextSwitch.c

@@ -30,7 +30,11 @@
 /* We'd prefer to use getcontext() / setcontext() to portably change
    execution contexts within C code.  That's what these library
    functions are designed for. */
+#ifdef __APPLE__
+#include <sys/ucontext.h>
+#else
 #include <ucontext.h>
+#endif
 
 struct ThreadContext {
   ucontext_t _ucontext;