From c591ba1d3171d08d194eeb6ea3540ff696a3392b Mon Sep 17 00:00:00 2001 From: Cosmin Ioiart Date: Mon, 19 Mar 2012 10:56:03 +0100 Subject: [PATCH] Fixed Solaris compilation errors The value returned by get_kstat_value is of type long long whereas values is a union. Fixed the code so that the value gets assigned to one of the union members, in this case counter. --- src/nfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nfs.c b/src/nfs.c index de642a2c..58f2e0d2 100644 --- a/src/nfs.c +++ b/src/nfs.c @@ -18,6 +18,7 @@ * Authors: * Jason Pepas * Florian octo Forster + * Cosmin Ioiart **/ #include "collectd.h" @@ -331,7 +332,7 @@ static int nfs_read_kstat (kstat_t *ksp, int nfs_version, char *inst, kstat_read(kc, ksp, NULL); for (i = 0; i < proc_names_num; i++) - values[i] = (derive_t) get_kstat_value (ksp, proc_names[i]); + values[i].counter = (derive_t) get_kstat_value (ksp, proc_names[i]); nfs_procedures_submit (plugin_instance, proc_names, values, proc_names_num); -- 2.11.0