summaryrefslogtreecommitdiffstatshomepage
path: root/unix-cpy
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-06-08 13:25:33 +0100
committerDamien George <damien.p.george@gmail.com>2014-06-08 13:25:33 +0100
commit4480cb37118b662cf301953595b37704dc197d40 (patch)
tree856afe4dbfbeea23134dd40275cbd1aa96a1d0ed /unix-cpy
parentdf896eceef27bc9a159bd62cdd78c66a56462544 (diff)
downloadmicropython-4480cb37118b662cf301953595b37704dc197d40.tar.gz
micropython-4480cb37118b662cf301953595b37704dc197d40.zip
Provide definition of alloca() in mpconfigport.h.
Diffstat (limited to 'unix-cpy')
-rw-r--r--unix-cpy/mpconfigport.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/unix-cpy/mpconfigport.h b/unix-cpy/mpconfigport.h
index 78d197033a..a4b5cc0879 100644
--- a/unix-cpy/mpconfigport.h
+++ b/unix-cpy/mpconfigport.h
@@ -48,3 +48,10 @@ typedef unsigned int machine_uint_t; // must be pointer size
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef double machine_float_t;
+
+// We need to provide a declaration/definition of alloca()
+#ifdef __FreeBSD__
+#include <stdlib.h>
+#else
+#include <alloca.h>
+#endif