Merge branch 'collectd-5.5'
[collectd.git] / src / zfs_arc.c
index 1a7613c..e1c3937 100644 (file)
@@ -71,7 +71,7 @@ static int put_zfs_value (kstat_t *ksp, char const *k, value_t v)
        return 0;
 }
 
-static long long get_zfs_value(kstat_t *ksp, char *key)
+static long long get_zfs_value(kstat_t *ksp, const char *key)
 {
        llentry_t *e;
        value_t *v;
@@ -286,8 +286,11 @@ static int za_read (void)
        za_read_derive (ksp, "deleted",  "cache_operation", "deleted");
 #if __FreeBSD__
        za_read_derive (ksp, "allocated","cache_operation", "allocated");
+#if defined(__FreeBSD_version) && (__FreeBSD_version < 1002501)
+       /* stolen removed from sysctl kstat.zfs.misc.arcstats on FreeBSD 10.2+ */
        za_read_derive (ksp, "stolen",   "cache_operation", "stolen");
 #endif
+#endif
 
        /* Issue indicators */
        za_read_derive (ksp, "mutex_miss", "mutex_operations", "miss");