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
Родитель c74d30e795
Коммит f05416c91f
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

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