From 00f086d5165423665476c7ffe5c9c47b1497fb34 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 | 3 +++ src/utils_mount_test.c | 4 ++++ src/utils_vl_lookup.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 18b7d165..e24d85b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1375,6 +1375,9 @@ check_PROGRAMS = test_utils_mount test_utils_vl_lookup test_utils_mount_SOURCES = utils_mount_test.c testing.h test_utils_mount_LDADD = libmount.la daemon/libplugin_mock.la +if BUILD_WITH_LIBKSTAT +test_utils_mount_LDADD += -lkstat +endif test_utils_vl_lookup_SOURCES = utils_vl_lookup_test.c testing.h test_utils_vl_lookup_LDADD = liblookup.la daemon/libplugin_mock.la 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 f0f0b463..f85910e1 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.30.2