From 1b4d95b869063e619bd7aae54cf37c5a1b91fbee Mon Sep 17 00:00:00 2001 From: Dagobert Michelsen Date: Mon, 13 Jul 2015 12:00:10 +0200 Subject: [PATCH] Add missing kstat definitions --- src/Makefile.am | 3 +++ src/daemon/common_test.c | 4 ++++ src/daemon/utils_subst_test.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 2c7c1821..3f8eb38d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/daemon/common_test.c b/src/daemon/common_test.c index 0ee4e7e0..d8efb155 100644 --- a/src/daemon/common_test.c +++ b/src/daemon/common_test.c @@ -27,6 +27,10 @@ #include "testing.h" #include "common.h" +#if HAVE_LIBKSTAT +kstat_ctl_t *kc; +#endif /* HAVE_LIBKSTAT */ + DEF_TEST(sstrncpy) { char buffer[16] = ""; diff --git a/src/daemon/utils_subst_test.c b/src/daemon/utils_subst_test.c index 75197663..98e0b536 100644 --- a/src/daemon/utils_subst_test.c +++ b/src/daemon/utils_subst_test.c @@ -29,6 +29,10 @@ #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 { -- 2.11.0