diff options
author | Yusuke Endoh <[email protected]> | 2019-12-05 22:24:58 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2019-12-05 22:24:58 +0900 |
commit | f4d9daf2b6f23af08296c7ccb770e1de1bc723bd (patch) | |
tree | ceda2829463677837b9ed045e5a8d7d2773cb435 /coroutine/ucontext | |
parent | c3abbc1b2f52015dc839fd96545380dbc11c77a9 (diff) |
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/ucontext')
-rw-r--r-- | coroutine/ucontext/Context.c | 7 |
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) |