From 80fd575c8cc103133fed4c7386f0b7165abd2678 Mon Sep 17 00:00:00 2001 From: darc Date: Fri, 5 Jan 2024 00:47:57 -0600 Subject: [PATCH] embed: Fix alloca include for FreeBSD and NetBSD. Signed-off-by: darc --- ports/embed/port/mpconfigport_common.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/embed/port/mpconfigport_common.h b/ports/embed/port/mpconfigport_common.h index 69216a7582..8e19859ed2 100644 --- a/ports/embed/port/mpconfigport_common.h +++ b/ports/embed/port/mpconfigport_common.h @@ -33,6 +33,10 @@ typedef uintptr_t mp_uint_t; // must be pointer size typedef long mp_off_t; // Need to provide a declaration/definition of alloca() +#if defined(__FreeBSD__) || defined(__NetBSD__) +#include +#else #include +#endif #define MICROPY_MPHALPORT_H "port/mphalport.h"