]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Added missing include of 'kstat.h'
authorPavel Rochnyack <pavel2000@ngs.ru>
Sun, 20 May 2018 17:52:33 +0000 (00:52 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Sun, 20 May 2018 17:52:33 +0000 (00:52 +0700)
This adressed to solve compilation issue on Solaris platform:

src/utils_vl_lookup.c:37:1: error: unknown type name 'kstat_ctl_t'
 kstat_ctl_t *kc;

src/cpu.c
src/daemon/common_test.c
src/daemon/plugin_mock.c
src/daemon/utils_subst_test.c
src/disk.c
src/interface.c
src/tape.c
src/uptime.c
src/utils_mount_test.c
src/utils_vl_lookup.c
src/zfs_arc.c

index d48ab886332912a1c09e62c477d0048209dc9ab6..b898477fa3403cb9779e26037e5ae5cce2cecd74 100644 (file)
--- a/src/cpu.c
+++ b/src/cpu.c
@@ -134,6 +134,9 @@ static mach_msg_type_number_t cpu_list_len;
 /* #endif KERNEL_LINUX */
 
 #elif defined(HAVE_LIBKSTAT)
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
 /* colleague tells me that Sun doesn't sell systems with more than 100 or so
  * CPUs.. */
 #define MAX_NUMCPU 256
index 4d2ccaa338d22b31a76d599a94c610b267f5263f..af2840e5883147d474b8bb3b316515b86a6cd408 100644 (file)
 #include "common.h"
 #include "testing.h"
 
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
 #if HAVE_LIBKSTAT
 kstat_ctl_t *kc;
 #endif /* HAVE_LIBKSTAT */
index 6df4c15df691b2c3c162ff6e2c39d76637aa2cb4..96bf3826f3e17254dda3da65eb90e1030a930421 100644 (file)
 
 #include "plugin.h"
 
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
 #if HAVE_LIBKSTAT
 kstat_ctl_t *kc = NULL;
 #endif /* HAVE_LIBKSTAT */
index 00ea0eae2d81ea61cae355c20c004c83d13c73be..537921910fd0b50c76ef1d53ab20ab191aaebbcc 100644 (file)
 #include "testing.h"
 #include "utils_subst.h"
 
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
 #if HAVE_LIBKSTAT
 kstat_ctl_t *kc;
 #endif /* HAVE_LIBKSTAT */
index 51a50fd1e7c782d6d00ab12be68fbcc42bbfbe85..205d547b2a1edc3e5e9328a34adca045f5aa7475 100644 (file)
@@ -120,6 +120,9 @@ static struct gmesh geom_tree;
 /* #endif KERNEL_FREEBSD */
 
 #elif HAVE_LIBKSTAT
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
 #define MAX_NUMDISK 1024
 extern kstat_ctl_t *kc;
 static kstat_t *ksp[MAX_NUMDISK];
index deba1860ec1f1dd7312932ff786168995830a992..3a3e9f6ed386facda5390c5132c417a00ccf5d69 100644 (file)
@@ -91,6 +91,9 @@ static ignorelist_t *ignorelist = NULL;
 static _Bool report_inactive = 1;
 
 #ifdef HAVE_LIBKSTAT
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
 #define MAX_NUMIF 256
 extern kstat_ctl_t *kc;
 static kstat_t *ksp[MAX_NUMIF];
index debb1d28a52beb12b43f1940c7a49569d9e2f7b7..f59b7ea6b3860dc3892269b4455e398f31943323 100644 (file)
 #error "No applicable input method."
 #endif
 
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
 #define MAX_NUMTAPE 256
 extern kstat_ctl_t *kc;
 static kstat_t *ksp[MAX_NUMTAPE];
index d51aa391a09040229113c4accae5bb387375b897..76eb0d50a865d4c247a347e4227dad675298a8e7 100644 (file)
@@ -52,6 +52,9 @@
 /*
  * Global variables
  */
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
 
 #if HAVE_LIBKSTAT
 extern kstat_ctl_t *kc;
index ca65950ebffee08828b20d85a409debef23e28bc..e8f3009423706622988853b351932d730941d463 100644 (file)
 #include "testing.h"
 #include "utils_mount.h"
 
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
 #if HAVE_LIBKSTAT
 kstat_ctl_t *kc;
 #endif /* HAVE_LIBKSTAT */
index 76c0674b8d596e6f0e28eb97830eef9a5a422465..052c4c0f83b630fd42dd6b64df5ff257d22737a2 100644 (file)
 #include "utils_avltree.h"
 #include "utils_vl_lookup.h"
 
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
 #if HAVE_LIBKSTAT
 kstat_ctl_t *kc;
 #endif /* HAVE_LIBKSTAT */
index 5d37f9f1e0078ab73d3581138c55a1c18fc7be77..55166fa6486b30da24fd94110d6a01e9cc4d01e2 100644 (file)
@@ -99,6 +99,11 @@ static void free_zfs_values(kstat_t *ksp) {
 }
 
 #elif defined(KERNEL_SOLARIS)
+
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
 extern kstat_ctl_t *kc;
 
 static long long get_zfs_value(kstat_t *ksp, char *name) {