]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
djgpp: Skip check for negative timeval
authorJ.W. Jagersma <jwjagersma@gmail.com>
Sat, 1 Oct 2022 17:03:11 +0000 (19:03 +0200)
committerHugo Landau <hlandau@openssl.org>
Mon, 14 Nov 2022 07:47:53 +0000 (07:47 +0000)
This causes a warning since tv_sec is unsigned.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)

include/internal/time.h

index 3039327d58ee847c7257b23172b67fcee267773a..604f9e06d9c5783452e7703945ec96b99bd1772e 100644 (file)
@@ -97,8 +97,10 @@ OSSL_TIME ossl_time_from_timeval(struct timeval tv)
 {
     OSSL_TIME t;
 
+#ifndef __DJGPP__ /* tv_sec is unsigned on djgpp. */
     if (tv.tv_sec < 0)
         return ossl_time_zero();
+#endif
     t.t = tv.tv_sec * OSSL_TIME_SECOND + tv.tv_usec * OSSL_TIME_US;
     return t;
 }