From 8375d5c12b63ec99141bfb1b70c0f2cfe70b564b Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 2 Feb 2018 00:59:36 +0000 Subject: Fix HASSIGNEDSIGNED sysdeps macros, add localtm_from_ltm64 tolerance for 64-bit time_t --- src/libstddjb/localtm_from_ltm64.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libstddjb') diff --git a/src/libstddjb/localtm_from_ltm64.c b/src/libstddjb/localtm_from_ltm64.c index e2cc382..76703da 100644 --- a/src/libstddjb/localtm_from_ltm64.c +++ b/src/libstddjb/localtm_from_ltm64.c @@ -5,6 +5,7 @@ #define _BSD_SOURCE #endif +#include #include #include #include @@ -15,7 +16,9 @@ int localtm_from_ltm64 (struct tm *l, uint64_t uu, int tz) { if (uu < TAI_MAGIC) return (errno = EINVAL, 0) ; uu -= TAI_MAGIC ; +#if SKALIBS_SIZEOFTIME != 8 if (uu > 0xFFFFFFFFUL) return (errno = EOVERFLOW, 0) ; +#endif { time_t u = (time_t)uu ; if (tz ? !localtime_r(&u, l) : !gmtime_r(&u, l)) return 0 ; -- cgit v1.2.3