From 1a1dd39367b5e94828e5c871133c15e5002e3477 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 18 Jun 2022 13:54:47 -0500 Subject: [PATCH] Use __builtin_alloca if no other option. --- src/core/ffi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/ffi.c b/src/core/ffi.c index 49102b9d..1b77ccea 100644 --- a/src/core/ffi.c +++ b/src/core/ffi.c @@ -32,6 +32,9 @@ #define alloca _alloca #elif defined(JANET_LINUX) #include +#elif !defined(alloca) +/* Last ditch effort to get alloca - works for gcc and clang */ +#define alloca __builtin_alloca #endif #define JANET_FFI_MAX_RECUR 64