The branch master has been updated via 907720f0644bf6b7ad4fa94f03ac29402ae597ab (commit) from 69807ab8ed5d5b3b0bb59f418cb3a7658de005a3 (commit)
- Log ----------------------------------------------------------------- commit 907720f0644bf6b7ad4fa94f03ac29402ae597ab Author: Larkin Nickle <m...@larbob.org> Date: Wed Jun 2 14:17:40 2021 -0400 Fix compilation on systems with empty _POSIX_TIMERS Systems such as Tru64 ship with broken headers that have _POSIX_TIMERS defined but empty. CLA: trivial Reviewed-by: Tomas Mraz <to...@openssl.org> Reviewed-by: Paul Dale <pa...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15598) ----------------------------------------------------------------------- Summary of changes: providers/implementations/rands/seeding/rand_unix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/providers/implementations/rands/seeding/rand_unix.c b/providers/implementations/rands/seeding/rand_unix.c index f77f6e0324..2e6429344c 100644 --- a/providers/implementations/rands/seeding/rand_unix.c +++ b/providers/implementations/rands/seeding/rand_unix.c @@ -76,7 +76,9 @@ static uint64_t get_timer_bits(void); * macro that might be undefined. */ # undef OSSL_POSIX_TIMER_OKAY -# if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 +/* On some systems, _POSIX_TIMERS is defined but empty. + * Subtracting by 0 when comparing avoids an error in this case. */ +# if defined(_POSIX_TIMERS) && _POSIX_TIMERS -0 > 0 # if defined(__GLIBC__) # if defined(__GLIBC_PREREQ) # if __GLIBC_PREREQ(2, 17)