summaryrefslogtreecommitdiffstats
path: root/mansearch.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-09 14:24:53 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-09 14:24:53 +0000
commit0ea1030bba20b5f8f3b909a4e5673b2f1798af92 (patch)
tree1912ed3e6775cf821136982e6afeb0deb1e2d38a /mansearch.c
parent1edd5931bfc9dd3824a71ed842a034c18e5426e9 (diff)
downloadmandoc-0ea1030bba20b5f8f3b909a4e5673b2f1798af92.tar.gz
mmap(2) requires MAP_PRIVATE ^ MAP_SHARED for flags;
found by kristaps@ on Mac OS X
Diffstat (limited to 'mansearch.c')
-rw-r--r--mansearch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mansearch.c b/mansearch.c
index f9a8b39b..1fe1f594 100644
--- a/mansearch.c
+++ b/mansearch.c
@@ -123,7 +123,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");