diff options
author | J.W. Jagersma <jwjagersma@gmail.com> | 2022-10-01 19:03:11 +0200 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2022-11-14 08:47:53 +0100 |
commit | d8bcd64170e8b6fb66da293a95ff21b25d1a357e (patch) | |
tree | b00ddbf2349f3a55d9c1be171fa523cb88e44481 /include | |
parent | Define threads_lib.c functions only for OPENSSL_SYS_UNIX (diff) | |
download | openssl-d8bcd64170e8b6fb66da293a95ff21b25d1a357e.tar.xz openssl-d8bcd64170e8b6fb66da293a95ff21b25d1a357e.zip |
djgpp: Skip check for negative timeval
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)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/time.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/internal/time.h b/include/internal/time.h index 3039327d58..604f9e06d9 100644 --- a/include/internal/time.h +++ b/include/internal/time.h @@ -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; } |