]> git.ipfire.org Git - thirdparty/openssl.git/commit
For Unix, refactor OSSL_sleep() to use nanosleep() instead of usleep()
authorRichard Levitte <levitte@openssl.org>
Wed, 17 Apr 2024 11:45:32 +0000 (13:45 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 22 May 2024 07:59:32 +0000 (09:59 +0200)
commitf352c808edaaced8ba6a95cb440825094f2bb842
treef85ec6cc86c01644c60fa0828dda8b06e24f56f4
parent34f35473c06a91b82ce65cae952405a1bdb04dac
For Unix, refactor OSSL_sleep() to use nanosleep() instead of usleep()

usleep() is obsolete since POSIX.1-2001 and removed in POSIX.1-2008,
in favor of nanosleep(), which has been present since POSIX.1-2001.

The exceptions for DJGPP and TANDEM are preserved.  Also, just in case
nanosleep() turns out to be unavailable on any Unix machinery that we
are unaware of, we allow a revert to using usleep() by defining
OPENSSL_USE_USLEEP.

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24173)
crypto/sleep.c
util/platform_symbols/unix-symbols.txt