summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-06-08 13:18:14 +0100
committerDamien George <damien.p.george@gmail.com>2014-06-08 13:18:14 +0100
commitdf896eceef27bc9a159bd62cdd78c66a56462544 (patch)
treeb3dce6a1d4cdb931e784c380ab813012a35ddaba /unix
parent9e951498b28706bac7347d3c599977c13d9515c4 (diff)
parent0c90eb16586d6c15d619666687449b3351e536fc (diff)
downloadmicropython-df896eceef27bc9a159bd62cdd78c66a56462544.tar.gz
micropython-df896eceef27bc9a159bd62cdd78c66a56462544.zip
Merge branch 'alloca' of github.com:marcusva/micropython into marcusva-alloca
Diffstat (limited to 'unix')
-rw-r--r--unix/modsocket.c1
-rw-r--r--unix/mpconfigport.h8
2 files changed, 8 insertions, 1 deletions
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 <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
-#include <alloca.h>
#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 <stdlib.h>
+#else
+#include <alloca.h>
+#endif