Code

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 2c7c1821b5ceeaec2b9a04f74c91d87985a61dbf..3f8eb38d6b305eacf8039bd9918444e8f8514b37 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 0ee4e7e0eb2c6823e81f32063ceff48eaca8c127..d8efb1553297e92eda45b1cac073be4085f1e717 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 751976630fb87e0819053bf123b728f71e6aca29..98e0b536f6142184a94a780b3e8481675b1f4478 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 {