summaryrefslogtreecommitdiffstatshomepage
path: root/unix/alloc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-11 17:28:27 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-16 18:03:01 +0000
commit3926c72dd2c6c9bfc4840f914be5a55258d3a248 (patch)
tree02f3901960bc77581a01aa3eba336d6c2e7b198d /unix/alloc.c
parent963a5a3e82ded7ee75adae72ae7cb14796fa150e (diff)
downloadmicropython-3926c72dd2c6c9bfc4840f914be5a55258d3a248.tar.gz
micropython-3926c72dd2c6c9bfc4840f914be5a55258d3a248.zip
unix: Add target to build "minimal" uPy interpreter.
Diffstat (limited to 'unix/alloc.c')
-rw-r--r--unix/alloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/unix/alloc.c b/unix/alloc.c
index 44a84437ec..a0676a0aef 100644
--- a/unix/alloc.c
+++ b/unix/alloc.c
@@ -33,6 +33,8 @@
#include "py/mpstate.h"
#include "py/gc.h"
+#if MICROPY_EMIT_NATIVE
+
#if defined(__OpenBSD__) || defined(__MACH__)
#define MAP_ANONYMOUS MAP_ANON
#endif
@@ -82,3 +84,5 @@ void mp_unix_mark_exec(void) {
gc_collect_root(rg->ptr, rg->len / sizeof(mp_uint_t));
}
}
+
+#endif // MICROPY_EMIT_NATIVE