From: Cosmin Ioiart Date: Mon, 19 Mar 2012 09:56:03 +0000 (+0100) Subject: Fixed Solaris compilation errors X-Git-Tag: collectd-5.1.0~4^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c591ba1d3171d08d194eeb6ea3540ff696a3392b;p=collectd.git 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. --- 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);