#include "collectd.h"
-#include "common.h"
#include "plugin.h"
+#include "utils/common/common.h"
/*
* Global variables
}
#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) {
size_t valuelen = sizeof(value);
int rv;
- snprintf(buffer, sizeof(buffer), "%s%s", zfs_arcstat, name);
+ ssnprintf(buffer, sizeof(buffer), "%s%s", zfs_arcstat, name);
rv = sysctlbyname(buffer, (void *)&value, &valuelen,
/* new value = */ NULL, /* new length = */ (size_t)0);
if (rv == 0)