some 32bit architectures e.g. RISCV32 use 64bit time_t from beginning
which does not fit into long int size on LP32 systems
Signed-off-by: Khem Raj <raj.khem@gmail.com>
if (tm) {
strftime(timestamp, sizeof(timestamp), "%Y-%m-%dT%H:%M:%S", &*tm);
} else {
- snprintf(timestamp, sizeof(timestamp), "%lu", tv.tv_sec);
+ snprintf(timestamp,
+ sizeof(timestamp),
+ "%llu",
+ (long long unsigned int)tv.tv_sec);
}
snprintf(prefix,
sizeof(prefix),