From: schwarze Date: Sat, 9 Aug 2014 14:24:49 +0000 (+0000) Subject: mmap(2) requires MAP_PRIVATE ^ MAP_SHARED for flags; X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b5bf87044f4db7bcc104bbc11a63724cbe166a63;p=openbsd mmap(2) requires MAP_PRIVATE ^ MAP_SHARED for flags; found by kristaps@ on Mac OS X --- 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 * Copyright (c) 2013, 2014 Ingo Schwarze @@ -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");