Fix coroutine copy implementation on OpenBSD

OpenBSD is the only platform that uses this support by default,
and it did not work because while OpenBSD supports alloca, it does
not include alloca.h.

This should be backported to Ruby 2.7.

From George Koehler
This commit is contained in:
Jeremy Evans 2019-12-27 15:01:01 -08:00
parent c74d30e795
commit f05416c91f

View File

@ -12,7 +12,11 @@
#include <setjmp.h> #include <setjmp.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
/* OpenBSD supports alloca, but does not include alloca.h */
#ifndef __OpenBSD__
#include <alloca.h> #include <alloca.h>
#endif
#define COROUTINE __attribute__((noreturn)) void #define COROUTINE __attribute__((noreturn)) void