[PATCH] Fix compilation under OpenBSD

Federico G. Schwindt fgsch at lodoss.net
Sat Mar 9 08:09:52 CET 2013


OpenBSD is not defined (unless sys/param.h is included) so simply use the gcc builtin define for it.

diff --git a/bin/varnishd/mgt/mgt_shmem.c b/bin/varnishd/mgt/mgt_shmem.c
index 7707309..3974b43 100644
--- a/bin/varnishd/mgt/mgt_shmem.c
+++ b/bin/varnishd/mgt/mgt_shmem.c
@@ -247,7 +247,7 @@ mgt_SHM_Create(void)
 		exit (-1);
 	}
 
-#ifdef OpenBSD
+#if defined(__OpenBSD__)
 	/* Commit changes, for OS's without coherent VM/buf */
 	AZ(msync(p, getpagesize(), MS_SYNC));
 #endif



More information about the varnish-dev mailing list