Code

More missing kstat usages
authorDagobert Michelsen <dam@opencsw.org>
Mon, 13 Jul 2015 10:12:07 +0000 (12:12 +0200)
committerDagobert Michelsen <dam@opencsw.org>
Mon, 13 Jul 2015 10:12:07 +0000 (12:12 +0200)
src/Makefile.am
src/utils_mount_test.c
src/utils_vl_lookup.c

index 3f8eb38d6b305eacf8039bd9918444e8f8514b37..24bcbeca7d5a3664dbabf31f150783364fa3efb5 100644 (file)
@@ -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
index c5ffbfbcf9fb9d701db96f02aafa1cc9873b4790..a16b262c268b254581c22383d907dc6392bdf379 100644 (file)
 #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";
index 75c0206169666da7b693f59880a5603c52ff5a03..bdc77988af43152498180e4d2df16b5106096d1a 100644 (file)
 #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 { \