Commit d3add746 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

While FreeBSD defaults to MAP_SHARED, Linux requires either MAP_SHARED or

MAP_PRIVATE to be specified.  Do so.

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@775 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 1fd67e3e
...@@ -85,7 +85,7 @@ vsl_shmem_map(void) ...@@ -85,7 +85,7 @@ vsl_shmem_map(void)
} }
vsl_lh = mmap(NULL, slh.size + sizeof slh, vsl_lh = mmap(NULL, slh.size + sizeof slh,
PROT_READ, MAP_HASSEMAPHORE, vsl_fd, 0); PROT_READ, MAP_SHARED|MAP_HASSEMAPHORE, vsl_fd, 0);
if (vsl_lh == MAP_FAILED) { if (vsl_lh == MAP_FAILED) {
fprintf(stderr, "Cannot mmap %s: %s\n", fprintf(stderr, "Cannot mmap %s: %s\n",
SHMLOG_FILENAME, strerror(errno)); SHMLOG_FILENAME, strerror(errno));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment