X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fusers.c;h=139c97659a974701c2f69051c4d8fb93e78fc833;hb=e2b289ea039269b60edd459d2d514d3f82820e3a;hp=ca05f50d9da8ba33460237ede1edd8d65313c85b;hpb=10e6e69a60f1722bb0a8a3b25bd5812471f33cfc;p=collectd.git diff --git a/src/users.c b/src/users.c index ca05f50d..139c9765 100644 --- a/src/users.c +++ b/src/users.c @@ -21,7 +21,7 @@ * Authors: * Sebastian Harl * Niki W. Waibel - * Florian octo Forster + * Florian octo Forster * Oleg King **/ @@ -99,11 +99,21 @@ static int users_read (void) #elif HAVE_LIBSTATGRAB sg_user_stats *us; +# if HAVE_LIBSTATGRAB_0_90 + size_t num_entries; + us = sg_get_user_stats (&num_entries); +# else us = sg_get_user_stats (); +# endif if (us == NULL) return (-1); - users_submit ((gauge_t) us->num_entries); + users_submit ((gauge_t) +# if HAVE_LIBSTATGRAB_0_90 + num_entries); +# else + us->num_entries); +# endif /* #endif HAVE_LIBSTATGRAB */ #else