[master] 2168fc6 Handle that varnishd is built after in-tree vmods

Poul-Henning Kamp phk at FreeBSD.org
Mon Mar 12 10:42:09 UTC 2018


commit 2168fc606f7d3c2e976c65f606502699bf4fce0e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Mar 12 10:41:23 2018 +0000

    Handle that varnishd is built after in-tree vmods

diff --git a/bin/varnishd/Makefile.am b/bin/varnishd/Makefile.am
index a135f80..452d044 100644
--- a/bin/varnishd/Makefile.am
+++ b/bin/varnishd/Makefile.am
@@ -154,6 +154,7 @@ vcldir=$(datarootdir)/$(PACKAGE)/vcl
 varnishd_CFLAGS = \
 	@PCRE_CFLAGS@ \
 	@SAN_CFLAGS@ \
+	-DNOT_IN_A_VMOD \
 	-DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"' \
 	-DVARNISH_VMOD_DIR='"${pkglibdir}/vmods"' \
 	-DVARNISH_VCL_DIR='"${pkgsysconfdir}:${vcldir}"'
diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h
index 31a0694..e05e87c 100644
--- a/bin/varnishd/cache/cache_varnishd.h
+++ b/bin/varnishd/cache/cache_varnishd.h
@@ -41,7 +41,9 @@
 
 #include "common/common_param.h"
 
-#include "VSC_main.h"
+#ifdef NOT_IN_A_VMOD
+#  include "VSC_main.h"
+#endif
 
 /* -------------------------------------------------------------------*/
 


More information about the varnish-commit mailing list