summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc-simple
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/malloc-simple')
-rw-r--r--libc/stdlib/malloc-simple/alloc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
index ed1c381a5..02231fbed 100644
--- a/libc/stdlib/malloc-simple/alloc.c
+++ b/libc/stdlib/malloc-simple/alloc.c
@@ -1,3 +1,4 @@
+#include <features.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -67,10 +68,10 @@ void *calloc(size_t num, size_t size)
void *malloc(size_t len)
{
void *result = mmap((void *) 0, len, PROT_READ | PROT_WRITE,
-#ifdef __HAS_NO_MMU__
- MAP_SHARED | MAP_ANONYMOUS, 0, 0
-#else
+#ifdef __UCLIBC_HAS_MMU__
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0
+#else
+ MAP_SHARED | MAP_ANONYMOUS, 0, 0
#endif
);