X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.c;h=65dee72d7a8517fe5560689d6c22107fb19d47c9;hb=15a21f242308218de9f171123ab7023dd20a1df6;hp=c6a651dc56248050ccc0b7a50c7aca68e4f2c3f9;hpb=a497509bc0a06065759a6d4e43497b75a2c9ecb8;p=collectd.git diff --git a/src/common.c b/src/common.c index c6a651dc..65dee72d 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: