From: Ruben Kerkhof Date: Sat, 1 Aug 2015 11:22:07 +0000 (+0200) Subject: Fix varnish detection on FreeBSD X-Git-Tag: collectd-5.5.1~73 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ec2e074fd3af505875984dff66eb23c9b024f531;p=collectd.git Fix varnish detection on FreeBSD We look for varnish/vapi/vsc.h in /usr/include/varnish but we should look for vapi/vsc.h This is only an issue on FreeBSD since /usr/local/include is not in the default search path. --- diff --git a/configure.ac b/configure.ac index ccb90c9f..2da40aac 100644 --- a/configure.ac +++ b/configure.ac @@ -4791,11 +4791,11 @@ then CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags" - AC_CHECK_HEADERS(varnish/vapi/vsc.h, + AC_CHECK_HEADERS(vapi/vsc.h, [AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])], - [AC_CHECK_HEADERS(varnish/vsc.h, + [AC_CHECK_HEADERS(vsc.h, [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support])], - [AC_CHECK_HEADERS(varnish/varnishapi.h, + [AC_CHECK_HEADERS(varnishapi.h, [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])], [with_libvarnish="no (found none of the varnish header files)"])])]) diff --git a/src/varnish.c b/src/varnish.c index a27f9cf6..10892223 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -29,19 +29,19 @@ #include "configfile.h" #if HAVE_VARNISH_V4 -#include -#include +#include +#include typedef struct VSC_C_main c_varnish_stats_t; #endif #if HAVE_VARNISH_V3 -#include -#include +#include +#include typedef struct VSC_C_main c_varnish_stats_t; #endif #if HAVE_VARNISH_V2 -#include +#include typedef struct varnish_stats c_varnish_stats_t; #endif