summaryrefslogtreecommitdiff
path: root/libc/misc/time/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/time/time.c')
-rw-r--r--libc/misc/time/time.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index 0f7c6a33f..b6a5b097d 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -2478,9 +2478,16 @@ DST_CORRECT:
+ p[3]) + p[7])));
DST_CORRECT:
+#if defined(__UCLIBC_USE_TIME64__)
+ if (((unsigned long long)(secs - LLONG_MIN))
+ > (((unsigned long long)LLONG_MAX) - LLONG_MIN)
+ )
+#else
if (((unsigned long long)(secs - LONG_MIN))
> (((unsigned long long)LONG_MAX) - LONG_MIN)
- ) {
+ )
+#endif
+ {
t = ((time_t)(-1));
goto DONE;
}