Fix the OSSL_TIME fallback in include/internal/e_os.h
authorRichard Levitte <levitte@openssl.org>
Wed, 14 Sep 2022 10:32:26 +0000 (12:32 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 14 Sep 2022 10:32:26 +0000 (12:32 +0200)
There's a fallback `ossl_sleep()` that uses `OSSL_TIME`.  However,
nothing was done to ensure that `OSSL_TIME` is defined.

Adding an inclusion of "internal/time.h" should be enough.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/19214)

include/internal/e_os.h

index 0e5203643447a7562fc91ea31aa9dd8ed7807bf7..1be20f61f91d193da2dfbe526fae043ead21b695 100644 (file)
@@ -320,6 +320,7 @@ static ossl_inline void ossl_sleep(unsigned long millis)
 }
 #else
 /* Fallback to a busy wait */
+# include "internal/time.h"
 static ossl_inline void ossl_sleep(unsigned long millis)
 {
     const OSSL_TIME finish = ossl_time_add(ossl_time_now(), ossl_ms2time(millis));