embed: Fix alloca include for FreeBSD and NetBSD.

Signed-off-by: darc <darcagn@protonmail.com>
This commit is contained in:
darc 2024-01-05 00:47:57 -06:00
parent 42eab32a36
commit 80fd575c8c
1 changed files with 4 additions and 0 deletions

View File

@ -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 <stdlib.h>
#else
#include <alloca.h>
#endif
#define MICROPY_MPHALPORT_H "port/mphalport.h"