summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Waggoner <waggoner.chris@gmail.com>2022-08-21 06:57:12 -0400
committerDamien George <damien@micropython.org>2022-08-23 13:39:18 +1000
commitb1efc1340af122499e5cf1d7214d51e034d45a20 (patch)
tree0680367e60e839563d3eeebff96be3a913b87722
parentd8ad87843ab38dcc74e7e86354849fff585e1ba8 (diff)
mpy-cross,unix: Include alloca.h for NetBSD.
-rw-r--r--mpy-cross/mpconfigport.h2
-rw-r--r--ports/unix/mpconfigport.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/mpy-cross/mpconfigport.h b/mpy-cross/mpconfigport.h
index 9d455c0af..4304c552b 100644
--- a/mpy-cross/mpconfigport.h
+++ b/mpy-cross/mpconfigport.h
@@ -119,7 +119,7 @@ typedef long mp_off_t;
#define MP_PLAT_PRINT_STRN(str, len) (void)0
// We need to provide a declaration/definition of alloca()
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <stdlib.h>
#elif defined(_WIN32)
#include <malloc.h>
diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h
index 03b8ceb1f..dd73f61e2 100644
--- a/ports/unix/mpconfigport.h
+++ b/ports/unix/mpconfigport.h
@@ -294,7 +294,7 @@ static inline unsigned long mp_urandom_seed_init(void) {
// We need to provide a declaration/definition of alloca()
// unless support for it is disabled.
#if !defined(MICROPY_NO_ALLOCA) || MICROPY_NO_ALLOCA == 0
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <stdlib.h>
#else
#include <alloca.h>