summaryrefslogtreecommitdiff
path: root/coroutine/ucontext/Context.c
diff options
context:
space:
mode:
Diffstat (limited to 'coroutine/ucontext/Context.c')
-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)