From a0700ccb18bb4c03d4382104e90d5e11aa73ab3c Mon Sep 17 00:00:00 2001 From: Jan Andres Date: Sat, 17 Oct 2015 20:07:10 +0200 Subject: [PATCH] Fix TIMESPEC_TO_CDTIME_T() on 32-bit arch. Add ULL prefix to constant to ensure we get a 64-bit unsigned multiply. --- src/daemon/utils_time.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.11.0