From dbdd330cf7a2d22e10eace1965a7dd07adf9610f Mon Sep 17 00:00:00 2001 From: Henry Ford Date: Mon, 20 Nov 2023 20:44:56 -0500 Subject: [PATCH] wscript: try to find alloca in stdlib.h on platforms without alloca.h or malloc.h --- wscript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wscript b/wscript index 07ee9547..83133321 100644 --- a/wscript +++ b/wscript @@ -378,6 +378,9 @@ def configure(conf): conf.define('ALLOCA_H', 'alloca.h') elif conf.check_cc(header_name='malloc.h', mandatory=False): conf.define('ALLOCA_H', 'malloc.h') + elif conf.check_cc(fragment = '''#include + int main(void) { alloca(1); }''', msg = 'Checking for alloca in stdlib.h'): + conf.define('ALLOCA_H', 'stdlib.h') if conf.env.DEST_OS == 'nswitch': conf.check_cfg(package='solder', args='--cflags --libs', uselib_store='SOLDER')