diff -u -r ../work-orig/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp ./hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
--- ../work-orig/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	2010-10-30 00:44:14.000000000 +0800
+++ ./hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	2010-10-30 00:54:55.000000000 +0800
@@ -45,8 +45,12 @@
 # include <pwd.h>
 # include <poll.h>
 #ifndef __OpenBSD__
+#if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
+# include <sys/ucontext.h>
+#else
 # include <ucontext.h>
 #endif
+#endif
 
 #if defined(_ALLBSD_SOURCE) && !defined(__APPLE__)
 # include <pthread_np.h>
diff -u -r ../work-orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp ./hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
--- ../work-orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp	2010-10-30 00:44:16.000000000 +0800
+++ ./hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp	2010-10-30 00:55:15.000000000 +0800
@@ -75,8 +75,12 @@
 #include <inttypes.h>
 #include <signal.h>
 #ifndef __OpenBSD__
+#if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
+# include <sys/ucontext.h>
+#else
 #include <ucontext.h>
 #endif
+#endif
 #ifdef __APPLE__
   #include <AvailabilityMacros.h>
   #if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
