[master] 4ea2deb Moving these to vdef.h was a silly idea, they need to come after #include <sys/mman.h> Move them back.

Poul-Henning Kamp phk at FreeBSD.org
Wed Aug 30 09:21:06 CEST 2017


commit 4ea2deb58d3994fca99cd0a76e5f07d780a689b1
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Aug 30 07:19:57 2017 +0000

    Moving these to vdef.h was a silly idea, they need to come after
    	#include <sys/mman.h>
    Move them back.

diff --git a/include/vdef.h b/include/vdef.h
index 5cde2f0..af51c47 100644
--- a/include/vdef.h
+++ b/include/vdef.h
@@ -129,12 +129,4 @@
 #  define _Static_assert(a,b)
 #endif
 
-#ifndef MAP_HASSEMAPHORE
-#  define MAP_HASSEMAPHORE 0 /* XXX Linux */
-#endif
-
-#ifndef MAP_NOSYNC
-#  define MAP_NOSYNC 0 /* XXX Linux */
-#endif
-
 #endif /* VDEF_H_INCLUDED */
diff --git a/lib/libvarnish/vsmw.c b/lib/libvarnish/vsmw.c
index 41b1fa2..ee9fa3e 100644
--- a/lib/libvarnish/vsmw.c
+++ b/lib/libvarnish/vsmw.c
@@ -56,6 +56,14 @@
 #include "vfil.h"
 #include "vrnd.h"
 
+#ifndef MAP_HASSEMAPHORE
+#  define MAP_HASSEMAPHORE 0 /* XXX Linux */
+#endif
+
+#ifndef MAP_NOSYNC
+#  define MAP_NOSYNC 0 /* XXX Linux */
+#endif
+
 /*--------------------------------------------------------------------*/
 
 struct vsmwseg {
diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index 482b5b7..02d9403 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -58,6 +58,14 @@
 
 #include "vapi/vsm.h"
 
+#ifndef MAP_HASSEMAPHORE
+#  define MAP_HASSEMAPHORE 0 /* XXX Linux */
+#endif
+
+#ifndef MAP_NOSYNC
+#  define MAP_NOSYNC 0 /* XXX Linux */
+#endif
+
 const struct vsm_valid VSM_invalid[1] = {{"invalid"}};
 const struct vsm_valid VSM_valid[1] = {{"valid"}};
 



More information about the varnish-commit mailing list