X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.c;h=c3e502ad97f96d478e9890638c9f59ae25489740;hb=ba9b76d4be49c6a45b32a508c48e828a583b6dfc;hp=8c2aeaea653aefe0f5380783175b4cb75e10fde2;hpb=67e4e517f58dac2a7b0e63b80256231480bfa59d;p=collectd.git diff --git a/src/common.c b/src/common.c index 8c2aeaea..c3e502ad 100644 --- a/src/common.c +++ b/src/common.c @@ -668,6 +668,7 @@ long long get_kstat_value (kstat_t *ksp, char *name) } #endif /* HAVE_LIBKSTAT */ +#ifndef HAVE_HTONLL unsigned long long ntohll (unsigned long long n) { #if BYTE_ORDER == BIG_ENDIAN @@ -685,6 +686,7 @@ unsigned long long htonll (unsigned long long n) return (((unsigned long long) htonl (n)) << 32) + htonl (n >> 32); #endif } /* unsigned long long htonll */ +#endif /* HAVE_HTONLL */ #if FP_LAYOUT_NEED_NOTHING /* Well, we need nothing.. */ @@ -861,11 +863,11 @@ int parse_value (const char *value, value_t *ret_value, int ds_type) break; case DS_TYPE_DERIVE: - ret_value->counter = (derive_t) strtoll (value, &endptr, 0); + ret_value->derive = (derive_t) strtoll (value, &endptr, 0); break; case DS_TYPE_ABSOLUTE: - ret_value->counter = (absolute_t) strtoull (value, &endptr, 0); + ret_value->absolute = (absolute_t) strtoull (value, &endptr, 0); break; default: