- FreeBSD provides alloca() via stdlib.h, in contrast to Linux and Windows
- Move the includes for alloca() intp mpconfigport.h
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h
index ace7a41..fe68b99 100644
--- a/unix/mpconfigport.h
+++ b/unix/mpconfigport.h
@@ -98,3 +98,11 @@
 #define MICROPY_PORT_BUILTINS \
     { MP_OBJ_NEW_QSTR(MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \
     { MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
+
+
+/* We need the correct header for alloca() */
+#ifdef __FreeBSD__
+#include <stdlib.h>
+#else
+#include <alloca.h>
+#endif