[master] 5793190 It is not kosher to have #ifdefs inside macros.

Poul-Henning Kamp phk at FreeBSD.org
Mon Oct 19 11:44:11 CEST 2015


commit 57931908ca6f292f602883ca0872ebc6f9c27d56
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Oct 19 09:43:29 2015 +0000

    It is not kosher to have #ifdefs inside macros.

diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index 899b9ba..5ceb80d 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -395,6 +395,10 @@ init_params(struct cli *cli)
 		MCF_SetDefault("gzip_buffer", "4k");
 	}
 
+#if !defined(HAVE_ACCEPT_FILTERS) || defined(__linux)
+	MCF_SetDefault("accept_filter", "off");
+#endif
+
 	low = sysconf(_SC_THREAD_STACK_MIN);
 	bprintf(stackmin, "%jd", (intmax_t)low);
 	MCF_SetMinimum("thread_pool_stack", stackmin);
diff --git a/include/tbl/params.h b/include/tbl/params.h
index c7f1479..d2650f4 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -35,11 +35,7 @@ PARAM(
 	/* typ */	bool,
 	/* min */	NULL,
 	/* max */	NULL,
-#if defined(HAVE_ACCEPT_FILTERS) || defined(__linux)
 	/* default */	"on",
-#else
-	/* default */	"off",
-#endif /* HAVE_ACCEPT_FILTERS || __linux */
 	/* units */	"bool",
 	/* flags */	MUST_RESTART,
 	/* s-text */



More information about the varnish-commit mailing list