From 2d51f3eaee79b36f9ec51381075b1f486b7921b8 Mon Sep 17 00:00:00 2001 From: Dagobert Michelsen Date: Mon, 13 Jul 2015 12:12:07 +0200 Subject: [PATCH] More missing kstat usages --- src/Makefile.am | 4 +++- src/utils_mount_test.c | 4 ++++ src/utils_vl_lookup.c | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) 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 { \ -- 2.11.0