From f4d9daf2b6f23af08296c7ccb770e1de1bc723bd Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Thu, 5 Dec 2019 22:24:58 +0900 Subject: 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 --- coroutine/ucontext/Context.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'coroutine') 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) -- cgit v1.2.3