[master] 7c328f9 Make miniobj work downstream

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Mar 13 13:45:07 CET 2017


commit 7c328f916d870d3a54bcdb91e08e30acbee0af9b
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Sat Mar 11 13:50:34 2017 +0100

    Make miniobj work downstream

diff --git a/configure.ac b/configure.ac
index b9463f6..a85b19a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -194,7 +194,7 @@ AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
 AC_CHECK_HEADERS([priv.h])
 
 # Checks for library functions.
-AC_CHECK_FUNCS([explicit_bzero])
+_VARNISH_CHECK_EXPLICIT_BZERO
 AC_CHECK_FUNCS([nanosleep])
 AC_CHECK_FUNCS([setppriv])
 AC_CHECK_FUNCS([fallocate])
diff --git a/include/miniobj.h b/include/miniobj.h
index 952a068..8186b9b 100644
--- a/include/miniobj.h
+++ b/include/miniobj.h
@@ -5,7 +5,7 @@
  *
  */
 
-#if HAVE_EXPLICIT_BZERO
+#ifdef HAVE_EXPLICIT_BZERO
 #  define ZERO_OBJ(to, sz)	explicit_bzero(to, sz)
 #else
 #  define ZERO_OBJ(to, sz)	(void)memset(to, 0, sz)
diff --git a/varnish.m4 b/varnish.m4
index efb3c3b..b2157ce 100644
--- a/varnish.m4
+++ b/varnish.m4
@@ -62,6 +62,12 @@ AC_DEFUN([_VARNISH_SEARCH_LIBS], [
 	LIBS="${save_LIBS}"
 ])
 
+# _VARNISH_CHECK_EXPLICIT_BZERO()
+# -------------------------------
+AC_DEFUN([_VARNISH_CHECK_EXPLICIT_BZERO], [
+	AC_CHECK_FUNCS([explicit_bzero])
+])
+
 # _VARNISH_PKG_CONFIG
 # --------------------
 AC_DEFUN([_VARNISH_PKG_CONFIG], [
@@ -91,6 +97,7 @@ AC_DEFUN([_VARNISH_PKG_CONFIG], [
 AC_DEFUN([_VARNISH_CHECK_DEVEL], [
 
 	AC_REQUIRE([_VARNISH_PKG_CONFIG])
+	AC_REQUIRE([_VARNISH_CHECK_EXPLICIT_BZERO])
 
 	[_orig_cppflags=$CPPFLAGS]
 	[CPPFLAGS=$VARNISHAPI_CFLAGS]
@@ -358,6 +365,7 @@ AC_DEFUN([VARNISH_VMODS], [
 #
 AC_DEFUN([VARNISH_PREREQ], [
 	AC_REQUIRE([_VARNISH_PKG_CONFIG])
+	AC_REQUIRE([_VARNISH_CHECK_EXPLICIT_BZERO])
 	AC_MSG_CHECKING([for Varnish])
 	AC_MSG_RESULT([$VARNISH_VERSION])
 



More information about the varnish-commit mailing list