aboutsummaryrefslogtreecommitdiffstats
path: root/coroutine
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-12-05 22:24:58 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-12-05 22:24:58 +0900
commitf4d9daf2b6f23af08296c7ccb770e1de1bc723bd (patch)
treeceda2829463677837b9ed045e5a8d7d2773cb435 /coroutine
parentc3abbc1b2f52015dc839fd96545380dbc11c77a9 (diff)
downloadruby-f4d9daf2b6f23af08296c7ccb770e1de1bc723bd.tar.gz
coroutine/ucontext/Context.c: define __EXTENSIONS__ explicitly
instead of ruby/config.h, per samuel's request. https://github.com/ruby/ruby/commit/dbfd4b780e3914a3f27e92c2248254452bf0fd6b#diff-7fd78c3cc8a19b7e0637502983ec26ff
Diffstat (limited to 'coroutine')
-rw-r--r--coroutine/ucontext/Context.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/coroutine/ucontext/Context.c b/coroutine/ucontext/Context.c
index 9ce768561b..eec4ef3956 100644
--- a/coroutine/ucontext/Context.c
+++ b/coroutine/ucontext/Context.c
@@ -5,7 +5,12 @@
* Copyright, 2019, by Samuel Williams. All rights reserved.
*/
-#include "ruby/config.h"
+/* According to Solaris' ucontext.h, makecontext, etc. are removed in SUSv4.
+ * To enable the prototype declarations, we need to define __EXTENSIONS__.
+ */
+#if defined(__sun) && !defined(__EXTENSIONS__)
+#define __EXTENSIONS__
+#endif
#include "Context.h"
void coroutine_trampoline(void * _start, void * _context)