diff options
author | Larkin Nickle <me@larbob.org> | 2021-06-02 14:17:40 -0400 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-06-08 21:05:21 +1000 |
commit | 907720f0644bf6b7ad4fa94f03ac29402ae597ab (patch) | |
tree | b9f127e10a524930d17d811f206db7f90f951daf /providers | |
parent | 69807ab8ed5d5b3b0bb59f418cb3a7658de005a3 (diff) |
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 <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15598)
Diffstat (limited to 'providers')
-rw-r--r-- | providers/implementations/rands/seeding/rand_unix.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) |