Add missing kstat definitions
authorDagobert Michelsen <dam@opencsw.org>
Mon, 13 Jul 2015 10:00:10 +0000 (12:00 +0200)
committerDagobert Michelsen <dam@opencsw.org>
Mon, 13 Jul 2015 10:00:10 +0000 (12:00 +0200)
src/Makefile.am
src/daemon/common_test.c
src/daemon/utils_subst_test.c

index 2c7c182..3f8eb38 100644 (file)
@@ -34,6 +34,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
index 0ee4e7e..d8efb15 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 7519766..98e0b53 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 {