r775 - trunk/varnish-cache/lib/libvarnishapi

des at projects.linpro.no des at projects.linpro.no
Tue Aug 8 16:52:14 CEST 2006


Author: des
Date: 2006-08-08 16:52:14 +0200 (Tue, 08 Aug 2006)
New Revision: 775

Modified:
   trunk/varnish-cache/lib/libvarnishapi/shmlog.c
Log:
While FreeBSD defaults to MAP_SHARED, Linux requires either MAP_SHARED or
MAP_PRIVATE to be specified.  Do so.

Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2006-08-08 14:00:28 UTC (rev 774)
+++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2006-08-08 14:52:14 UTC (rev 775)
@@ -85,7 +85,7 @@
 	}
 
 	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) {
 		fprintf(stderr, "Cannot mmap %s: %s\n",
 		    SHMLOG_FILENAME, strerror(errno));




More information about the varnish-commit mailing list