summaryrefslogtreecommitdiff
path: root/src/ralloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ralloc.c')
-rw-r--r--src/ralloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ralloc.c b/src/ralloc.c
index f6ae887f4c1..65015d5f374 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -1322,10 +1322,12 @@ void r_alloc_free P_ ((POINTER_TYPE **ptr));
void
r_alloc_init_fd ()
{
+#if !MAP_ANON
/* No anonymous mmap -- we need the file descriptor. */
mmap_fd = open ("/dev/zero", O_RDONLY);
if (mmap_fd < 0)
fatal ("cannot open /dev/zero");
+#endif
}
/* Return a region overlapping address range START...END, or null if