Fix the OSSL_TIME fallback in include/internal/e_os.h

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)
This commit is contained in:
Richard Levitte 2022-09-14 12:32:26 +02:00
parent 45e7ef5fe3
commit eb51673e52

View 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));