[4.1] 979fbc6 Fix building on FreeBSD < 10.0

Lasse Karstensen lkarsten at varnish-software.com
Thu Jan 14 15:15:03 CET 2016


commit 979fbc6026635112fff9c50a270eac586447c457
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Mon Oct 26 16:46:18 2015 +0000

    Fix building on FreeBSD < 10.0

diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index cc5471c..83de0cd 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -188,7 +188,7 @@ static struct cli_proto debug_cmds[] = {
  * XXX: Think more about which order we start things
  */
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && __FreeBSD__version >= 1000000
 static void
 child_malloc_fail(void *p, const char *s)
 {
@@ -205,7 +205,7 @@ child_main(void)
 	setbuf(stdout, NULL);
 	setbuf(stderr, NULL);
 	printf("Child starts\n");
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && __FreeBSD__version >= 1000000
 	malloc_message = child_malloc_fail;
 #endif
 



More information about the varnish-commit mailing list