From f67a3703118be7d97629130d99630996ff3cb255 Mon Sep 17 00:00:00 2001 From: SiZiOUS Date: Sat, 19 Jul 2025 18:45:42 +0200 Subject: [PATCH] embed/port: Fix alloca include for Windows platforms. When building the embedded port on MinGW-w64, I receive the following error: fatal error: alloca.h: No such file or directory MinGW-w64 (used on MSYS2) doesn't include `alloca.h`, but `alloca()` is provided via `malloc.h` instead. And this fix is also needed for other Windows build systems. Signed-off-by: SiZiOUS --- ports/embed/port/mpconfigport_common.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/embed/port/mpconfigport_common.h b/ports/embed/port/mpconfigport_common.h index 8e19859ed2..aa65640fcd 100644 --- a/ports/embed/port/mpconfigport_common.h +++ b/ports/embed/port/mpconfigport_common.h @@ -34,8 +34,13 @@ typedef long mp_off_t; // Need to provide a declaration/definition of alloca() #if defined(__FreeBSD__) || defined(__NetBSD__) +// BSD #include +#elif defined(_WIN32) +// Windows +#include #else +// Other OS #include #endif