From: Dagobert Michelsen Date: Mon, 13 Jul 2015 10:00:10 +0000 (+0200) Subject: Add missing kstat definitions X-Git-Tag: collectd-5.6.0~596^2~1 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=1b4d95b869063e619bd7aae54cf37c5a1b91fbee;p=collectd.git Add missing kstat definitions --- diff --git a/src/Makefile.am b/src/Makefile.am index 2c7c1821..3f8eb38d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -34,6 +34,9 @@ check_PROGRAMS += test_utils_vl_lookup TESTS += test_utils_vl_lookup test_utils_vl_lookup_SOURCES = utils_vl_lookup_test.c testing.h test_utils_vl_lookup_LDADD = liblookup.la daemon/libcommon.la daemon/libplugin_mock.la +if BUILD_WITH_LIBKSTAT +test_utils_vl_lookup_LDADD += -lkstat +endif noinst_LTLIBRARIES += libmount.la libmount_la_SOURCES = utils_mount.c utils_mount.h diff --git a/src/daemon/common_test.c b/src/daemon/common_test.c index 0ee4e7e0..d8efb155 100644 --- a/src/daemon/common_test.c +++ b/src/daemon/common_test.c @@ -27,6 +27,10 @@ #include "testing.h" #include "common.h" +#if HAVE_LIBKSTAT +kstat_ctl_t *kc; +#endif /* HAVE_LIBKSTAT */ + DEF_TEST(sstrncpy) { char buffer[16] = ""; diff --git a/src/daemon/utils_subst_test.c b/src/daemon/utils_subst_test.c index 75197663..98e0b536 100644 --- a/src/daemon/utils_subst_test.c +++ b/src/daemon/utils_subst_test.c @@ -29,6 +29,10 @@ #include "common.h" /* for STATIC_ARRAY_SIZE */ #include "utils_subst.h" +#if HAVE_LIBKSTAT +kstat_ctl_t *kc; +#endif /* HAVE_LIBKSTAT */ + DEF_TEST(subst) { struct {