From: Jan Andres Date: Sat, 17 Oct 2015 18:07:10 +0000 (+0200) Subject: Fix TIMESPEC_TO_CDTIME_T() on 32-bit arch. X-Git-Tag: collectd-5.6.0~584^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a0700ccb18bb4c03d4382104e90d5e11aa73ab3c;p=collectd.git Fix TIMESPEC_TO_CDTIME_T() on 32-bit arch. Add ULL prefix to constant to ensure we get a 64-bit unsigned multiply. --- diff --git a/src/daemon/utils_time.h b/src/daemon/utils_time.h index 2cc84b5d..6566a739 100644 --- a/src/daemon/utils_time.h +++ b/src/daemon/utils_time.h @@ -72,7 +72,7 @@ (tsp)->tv_sec = CDTIME_T_TO_TIME_T (cdt); \ (tsp)->tv_nsec = (long) CDTIME_T_TO_NS ((cdt) & 0x3fffffff); \ } while (0) -#define TIMESPEC_TO_CDTIME_T(ts) NS_TO_CDTIME_T(1000000000 * (ts)->tv_sec + (ts)->tv_nsec) +#define TIMESPEC_TO_CDTIME_T(ts) NS_TO_CDTIME_T(1000000000ULL * (ts)->tv_sec + (ts)->tv_nsec) cdtime_t cdtime (void);