Files
macports-ports/lang/ruby/files/patch-node.h.diff
Wataru Kimura 446c49d10a lang/ruby: 1.8.7-p72_2
- add a patch to ignore getcontext()/setcontext() on 10.5.
    ruby 1.8.6 Portfile included this patch as "ignore-gsetcontext.diff".
    this patch is effective for ruby 1.8.7.
  - stop to disable "--enable-pthread" on 10.5 ppc (the above patch solve a
    problem, SEGV on 10.5 ppc)

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@41531 d073be05-634f-4543-b044-5fe20cf6d1d6
2008-11-05 16:38:26 +00:00

24 lines
682 B
Diff

--- node.h.orig 2008-07-07 15:17:24.000000000 +0900
+++ node.h 2008-11-06 00:53:06.000000000 +0900
@@ -375,9 +375,17 @@
void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t));
int rb_remove_event_hook _((rb_event_hook_func_t));
-#if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT)
-#include <ucontext.h>
-#define USE_CONTEXT
+#if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT)
+# if defined(__APPLE__)
+# include <AvailabilityMacros.h>
+# if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
+# include <ucontext.h>
+# define USE_CONTEXT
+# endif
+# else
+# include <ucontext.h>
+# define USE_CONTEXT
+# endif
#endif
#include <setjmp.h>
#include "st.h"