diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-03 21:05:59 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-03 23:58:25 +0100 |
commit | 2d60169dd60d503712d5c2e81a01158e82e636e6 (patch) | |
tree | cb52e26fc8d357e03c2634860554be625fd41d9f /src/basic/time-util.h | |
parent | 59e73c5b102402ea18aec1f4d69b4daad574e82b (diff) |
util: add check that makes sure time_t and TIME_T_MAX work the way we assume they do
Diffstat (limited to 'src/basic/time-util.h')
-rw-r--r-- | src/basic/time-util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/time-util.h b/src/basic/time-util.h index b37d5ad5dc..9c7758a959 100644 --- a/src/basic/time-util.h +++ b/src/basic/time-util.h @@ -69,7 +69,7 @@ typedef struct dual_timestamp { #define FORMAT_TIMESTAMP_RELATIVE_MAX 256 #define FORMAT_TIMESPAN_MAX 64 -#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1) +#define TIME_T_MAX (time_t)((UINTMAX_C(1) << ((sizeof(time_t) << 3) - 1)) - 1) #define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0ULL, 0ULL }) |