summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/stdlib/Makefile2
-rw-r--r--libc/stdlib/malloc-simple/Makefile2
-rw-r--r--libc/stdlib/malloc/Makefile2
-rw-r--r--libc/stdlib/malloc/malloc.c5
4 files changed, 5 insertions, 6 deletions
diff --git a/libc/stdlib/Makefile b/libc/stdlib/Makefile
index b4211ecf7..a6bd08710 100644
--- a/libc/stdlib/Makefile
+++ b/libc/stdlib/Makefile
@@ -21,7 +21,7 @@
# respective copyright holders.
TOPDIR=../
-include $(TOPDIR)Rules.make
+include $(TOPDIR)Rules.mak
LIBC=$(TOPDIR)libc.a
DIRS = $(MALLOC)
diff --git a/libc/stdlib/malloc-simple/Makefile b/libc/stdlib/malloc-simple/Makefile
index e46415536..765bf28d0 100644
--- a/libc/stdlib/malloc-simple/Makefile
+++ b/libc/stdlib/malloc-simple/Makefile
@@ -21,7 +21,7 @@
# respective copyright holders.
TOPDIR=../../
-include $(TOPDIR)Rules.make
+include $(TOPDIR)Rules.mak
LIBC=$(TOPDIR)libc.a
MSRC=alloc.c
diff --git a/libc/stdlib/malloc/Makefile b/libc/stdlib/malloc/Makefile
index 0824e71a8..920276c10 100644
--- a/libc/stdlib/malloc/Makefile
+++ b/libc/stdlib/malloc/Makefile
@@ -21,7 +21,7 @@
# respective copyright holders.
TOPDIR=../../
-include $(TOPDIR)Rules.make
+include $(TOPDIR)Rules.mak
LIBC=$(TOPDIR)libc.a
CSRC=malloc.c
diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c
index 4ed9fe873..88d8698b2 100644
--- a/libc/stdlib/malloc/malloc.c
+++ b/libc/stdlib/malloc/malloc.c
@@ -191,10 +191,9 @@ static void *hunk_alloc(int size)
{
if ((p = (Hunk_t*)mmap(HUNK_MSTART,HUNK_MSIZE,PROT_READ|PROT_WRITE,
#ifdef __HAS_NO_MMU__
- MAP_PRIVATE|MAP_ANONYMOUS
-#else
-
MAP_SHARED|MAP_ANONYMOUS
+#else
+ MAP_PRIVATE|MAP_ANONYMOUS
#endif
,0,0)) == (Hunk_t*)MAP_FAILED)
return NULL;