From 0c90eb16586d6c15d619666687449b3351e536fc Mon Sep 17 00:00:00 2001 From: Marcus von Appen Date: Sat, 7 Jun 2014 09:36:04 +0200 Subject: - FreeBSD provides alloca() via stdlib.h, in contrast to Linux and Windows - Move the includes for alloca() intp mpconfigport.h --- unix/modsocket.c | 1 - unix/mpconfigport.h | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'unix') diff --git a/unix/modsocket.c b/unix/modsocket.c index d6f732377..b1a34a39b 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 ace7a419b..fe68b9934 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -98,3 +98,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 -- cgit v1.2.3