diff options
author | Joerg Sonnenberger <joerg@netbsd.org> | 2010-06-06 20:44:53 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@netbsd.org> | 2010-06-06 20:44:53 +0000 |
commit | 34fea7d9c3c00551a204d61ab425a241e7eae4cb (patch) | |
tree | 58093f319a08881627bd92ee82ff02a265a3fe93 /main.c | |
parent | 800d2d2c54e5945bf0f9f81ab396e815d5a02f15 (diff) | |
download | mandoc-34fea7d9c3c00551a204d61ab425a241e7eae4cb.tar.gz |
Add MAP_SHARED for mmap, at least NetBSD with DIAGNOSTIC is quite noisy
otherwise.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -395,7 +395,7 @@ read_whole_file(struct curparse *curp, struct buf *fb, int *with_mmap) *with_mmap = 1; fb->sz = (size_t)st.st_size; fb->buf = mmap(NULL, fb->sz, PROT_READ, - MAP_FILE, curp->fd, 0); + MAP_FILE|MAP_SHARED, curp->fd, 0); if (fb->buf != MAP_FAILED) return(1); } |