8000 embed: Fix alloca include for FreeBSD and NetBSD. · pimoroni/micropython@80fd575 · GitHub
[go: up one dir, main page]

Skip to content

Commit 80fd575

Browse files
committed
embed: Fix alloca include for FreeBSD and NetBSD.
Signed-off-by: darc <darcagn@protonmail.com>
1 parent 42eab32 commit 80fd575

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ports/embed/port/mpconfigport_common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ typedef uintptr_t mp_uint_t; // must be pointer size
3333
typedef long mp_off_t;
3434

3535
// Need to provide a declaration/definition of alloca()
36+
#if defined(__FreeBSD__) || defined(__NetBSD__)
37+
#include <stdlib.h>
38+
#else
3639
#include <alloca.h>
40+
#endif
3741

3842
#define MICROPY_MPHALPORT_H "port/mphalport.h"

0 commit comments

Comments
 (0)
0