summary refs log tree commit diff
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2015-02-03 20:50:26 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2015-02-03 20:50:26 +0900
commit1f62d8d0be7290883991fb4de640fbecb7714917 (patch)
tree29342a8e819d5abbb81b52360150ce8672c3d89f
parent1a7473cbc1d7009055484360ae5a3a6f8bac0f6f (diff)
downloadzsh-1f62d8d0be7290883991fb4de640fbecb7714917.tar.gz
zsh-1f62d8d0be7290883991fb4de640fbecb7714917.tar.xz
zsh-1f62d8d0be7290883991fb4de640fbecb7714917.zip
34451: use mmap() also on Mac OS X
Let MAP_ANONYMOUS be an alias to MAP_ANON if the former is not
defined.
-rw-r--r--ChangeLog4
-rw-r--r--Src/mem.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c23e86f4f..98c103e0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-03  Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
+
+	* 34451: Src/mem.c: use mmap() also on Mac OS X
+
 2015-02-03  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 34455: Src/Modules/db_gdbm.c: some further parameter bug fixes
diff --git a/Src/mem.c b/Src/mem.c
index 7e0667a33..b9569ea0c 100644
--- a/Src/mem.c
+++ b/Src/mem.c
@@ -79,6 +79,10 @@
 
 #include <sys/mman.h>
 
+#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
 #if defined(MAP_ANONYMOUS) && defined(MAP_PRIVATE)
 
 #define USE_MMAP 1