diff --git a/py/builtinimport.c b/py/builtinimport.c index 795d9fd5e1..44ba4d5541 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "mpconfig.h" #include "nlr.h" diff --git a/py/objfun.c b/py/objfun.c index 5743fa550f..d63acc687b 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "mpconfig.h" #include "nlr.h" diff --git a/py/runtime.c b/py/runtime.c index 179b48d327..d57bb686d1 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "mpconfig.h" #include "nlr.h" diff --git a/py/vm.c b/py/vm.c index c084d89114..42709889cd 100644 --- a/py/vm.c +++ b/py/vm.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "mpconfig.h" #include "nlr.h" diff --git a/unix/modsocket.c b/unix/modsocket.c index d6f732377d..b1a34a39b8 100644 --- a/unix/modsocket.c +++ b/unix/modsocket.c @@ -37,7 +37,6 @@ #include #include #include -#include #include "mpconfig.h" #include "nlr.h" diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index bf2cf73efd..f6cef8578c 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -99,3 +99,11 @@ extern const struct _mp_obj_fun_native_t mp_builtin_open_obj; #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 +#else +#include +#endif diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h index 94304e20d2..831a218fbc 100644 --- a/windows/mpconfigport.h +++ b/windows/mpconfigport.h @@ -114,7 +114,7 @@ void msec_sleep(double msec); #include //for NULL #include //for assert - +#include //for alloca() // Functions implemented in platform code