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;
/* #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
#include "common.h"
#include "testing.h"
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
#if HAVE_LIBKSTAT
kstat_ctl_t *kc;
#endif /* HAVE_LIBKSTAT */
#include "plugin.h"
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
#if HAVE_LIBKSTAT
kstat_ctl_t *kc = NULL;
#endif /* HAVE_LIBKSTAT */
#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 */
/* #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];
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];
#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];
/*
* Global variables
*/
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
#if HAVE_LIBKSTAT
extern kstat_ctl_t *kc;
#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 */
#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 */
}
#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) {