From 34fea7d9c3c00551a204d61ab425a241e7eae4cb Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Sun, 6 Jun 2010 20:44:53 +0000 Subject: Add MAP_SHARED for mmap, at least NetBSD with DIAGNOSTIC is quite noisy otherwise. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 43b2ac86..7bab2768 100644 --- a/main.c +++ b/main.c @@ -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); } -- cgit