summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-08-09 14:24:50 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-08-09 14:24:50 +0000
commit2298c31a148eba309cc9c80863af500b93eaa8c4 (patch)
tree2cb8e30916abba9081f9922a6e4025d1330aa49b
parentc0851f648d065b60721c3bf7315428912f5d8eeb (diff)
mmap(2) requires MAP_PRIVATE ^ MAP_SHARED for flags;
found by kristaps@ on Mac OS X
-rw-r--r--usr.bin/mandoc/mansearch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mansearch.c b/usr.bin/mandoc/mansearch.c
index b457453ca3c..32fb2d9fe6b 100644
--- a/usr.bin/mandoc/mansearch.c
+++ b/usr.bin/mandoc/mansearch.c
@@ -1,4 +1,4 @@
-/* $Id: mansearch.c,v 1.30 2014/08/08 17:36:21 schwarze Exp $ */
+/* $Id: mansearch.c,v 1.31 2014/08/09 14:24:49 schwarze Exp $ */
/*
* Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -112,7 +112,8 @@ mansearch_setup(int start)
}
pagecache = mmap(NULL, PC_PAGESIZE * PC_NUMPAGES,
- PROT_READ | PROT_WRITE, MAP_ANON, -1, 0);
+ PROT_READ | PROT_WRITE,
+ MAP_SHARED | MAP_ANON, -1, 0);
if (MAP_FAILED == pagecache) {
perror("mmap");