ruby-changes:59092
From: Yusuke <ko1@a...>
Date: Thu, 5 Dec 2019 22:26:28 +0900 (JST)
Subject: [ruby-changes:59092] f4d9daf2b6 (master): coroutine/ucontext/Context.c: define __EXTENSIONS__ explicitly
https://git.ruby-lang.org/ruby.git/commit/?id=f4d9daf2b6 From f4d9daf2b6f23af08296c7ccb770e1de1bc723bd Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> 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 diff --git a/coroutine/ucontext/Context.c b/coroutine/ucontext/Context.c index 9ce7685..eec4ef3 100644 --- a/coroutine/ucontext/Context.c +++ b/coroutine/ucontext/Context.c @@ -5,7 +5,12 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/ucontext/Context.c#L5 * 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/