From: Dagobert Michelsen Date: Mon, 13 Jul 2015 10:12:07 +0000 (+0200) Subject: More missing kstat usages X-Git-Tag: collectd-5.6.0~596^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2d51f3eaee79b36f9ec51381075b1f486b7921b8;p=collectd.git More missing kstat usages --- diff --git a/src/Makefile.am b/src/Makefile.am index 3f8eb38d..24bcbeca 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,7 +44,9 @@ check_PROGRAMS += test_utils_mount TESTS += test_utils_mount test_utils_mount_SOURCES = utils_mount_test.c testing.h test_utils_mount_LDADD = libmount.la daemon/libcommon.la daemon/libplugin_mock.la - +if BUILD_WITH_LIBKSTAT +test_utils_mount_LDADD += -lkstat +endif sbin_PROGRAMS = collectdmon bin_PROGRAMS = collectd-nagios collectdctl collectd-tg diff --git a/src/utils_mount_test.c b/src/utils_mount_test.c index c5ffbfbc..a16b262c 100644 --- a/src/utils_mount_test.c +++ b/src/utils_mount_test.c @@ -28,6 +28,10 @@ #include "collectd.h" #include "utils_mount.h" +#if HAVE_LIBKSTAT +kstat_ctl_t *kc; +#endif /* HAVE_LIBKSTAT */ + DEF_TEST(cu_mount_checkoption) { char line_opts[] = "foo=one,bar=two,qux=three"; diff --git a/src/utils_vl_lookup.c b/src/utils_vl_lookup.c index 75c02061..bdc77988 100644 --- a/src/utils_vl_lookup.c +++ b/src/utils_vl_lookup.c @@ -33,6 +33,10 @@ #include "utils_vl_lookup.h" #include "utils_avltree.h" +#if HAVE_LIBKSTAT +kstat_ctl_t *kc; +#endif /* HAVE_LIBKSTAT */ + #if BUILD_TEST # define sstrncpy strncpy # define plugin_log(s, ...) do { \