Code

Merge remote-tracking branch 'origin/pr/1135'
authorMarc Fournier <marc.fournier@camptocamp.com>
Fri, 11 Sep 2015 20:41:55 +0000 (22:41 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Fri, 11 Sep 2015 20:41:55 +0000 (22:41 +0200)
src/Makefile.am
src/daemon/common_test.c
src/daemon/utils_subst_test.c
src/utils_mount_test.c
src/utils_vl_lookup.c

index adadbbd27bef87c333bb8cdb7f0ca005c4aac15c..d0bf5463d125b58b83d461b347961ff25e0a3208 100644 (file)
@@ -37,6 +37,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
@@ -44,7 +47,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 23c6f2328c01383c6c235afd42a6272d4c4a480c..399f8b533b2bcfdce28afa6b9c3a9f7573a89a75 100644 (file)
 #include "testing.h"
 #include "common.h"
 
+#if HAVE_LIBKSTAT
+kstat_ctl_t *kc;
+#endif /* HAVE_LIBKSTAT */
+
 DEF_TEST(sstrncpy)
 {
   char buffer[16] = "";
index 2a7080261ee366c86907cd8bc269cc4f67a96f8b..c12aa1057fe3d91022c67983d6a4e338c3b7f6ea 100644 (file)
 #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 {
index 77a4205e84de1ffed5bec5699a830d187cc71e56..b4cb43219a0e63b1ff8200ee79c3e2953704ca9c 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 f0f0b4632ecafda01572e7d3252e25fc77c5136d..f85910e1737e7b5d1c328a6e9e15896be2d60d99 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 { \