aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-10-08 18:38:43 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-10-08 18:38:43 -0700
commit17cc630b9b3c7954dcf85a0d68f69615fce07945 (patch)
treeaac32662b61bbd5fb8e122aa4464d977da6685a1
parent82004ce7a9d4d1be661d4adb9478a674930f7235 (diff)
mremap
-rw-r--r--src/dlmalloc.c2
-rw-r--r--system/include/bsd/sys/mman.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/dlmalloc.c b/src/dlmalloc.c
index 7dc24006..864117dd 100644
--- a/src/dlmalloc.c
+++ b/src/dlmalloc.c
@@ -592,7 +592,7 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
#define MMAP_CLEARS 1
#endif /* MMAP_CLEARS */
#ifndef HAVE_MREMAP
-#if linux && !defined(EMSCRIPTEN)
+#if linux
#define HAVE_MREMAP 1
#else /* linux */
#define HAVE_MREMAP 0
diff --git a/system/include/bsd/sys/mman.h b/system/include/bsd/sys/mman.h
index dea9bcae..d99d7711 100644
--- a/system/include/bsd/sys/mman.h
+++ b/system/include/bsd/sys/mman.h
@@ -155,6 +155,10 @@ int madvise __P((void *, size_t, int));
int mincore __P((const void *, size_t, char *));
int minherit __P((void *, size_t, int));
#endif
+
+/* XXX Emscripten */
+void *mremap(void *old_address, size_t old_size , size_t new_size, unsigned long flags);
+
__END_DECLS
#endif /* !_KERNEL */