summaryrefslogtreecommitdiff
path: root/mach_dep.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-09-15 19:38:30 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-09-15 19:38:30 +0400
commit333f2e13d5d8c0c1129de13cb822db4f559b313d (patch)
tree2e132749bb34e79727d24636c25e9103e0c16430 /mach_dep.c
parent735249e9bb2b3980e60f62b6fe26f8ad87a8eb51 (diff)
downloadbdwgc-333f2e13d5d8c0c1129de13cb822db4f559b313d.tar.gz
Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6.
* include/private/gc_priv.h (DARWIN): Include AvailabilityMacros.h (unless MAC_OS_X_VERSION_MAX_ALLOWED already defined). * mach_dep.c (GC_with_callee_saves_pushed): Include sys/ucontext.h (instead of ucontext.h) if Mac OS X 10.6 or higher.
Diffstat (limited to 'mach_dep.c')
-rw-r--r--mach_dep.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mach_dep.c b/mach_dep.c
index 35497aa3..7b038dc7 100644
--- a/mach_dep.c
+++ b/mach_dep.c
@@ -174,7 +174,12 @@ asm static void PushMacRegisters()
#if !defined(HAVE_PUSH_REGS) && defined(UNIX_LIKE)
# include <signal.h>
# ifndef NO_GETCONTEXT
-# include <ucontext.h>
+# if defined(DARWIN) \
+ && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 /*MAC_OS_X_VERSION_10_6*/)
+# include <sys/ucontext.h>
+# else
+# include <ucontext.h>
+# endif /* !DARWIN */
# ifdef GETCONTEXT_FPU_EXCMASK_BUG
# include <fenv.h>
# endif