From 01f4b44e075a796d62d3b007a80c5c04d0e77bfb Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 1 Sep 2024 01:07:16 -0400 Subject: [PATCH] Add support for elf_aux_info() on OpenBSD CLA: trivial Reviewed-by: Dmitry Belyavskiy Reviewed-by: Tom Cosgrove Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25346) --- crypto/armcap.c | 5 +++-- crypto/ppccap.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crypto/armcap.c b/crypto/armcap.c index 01be1a4d67..33b9dd4df0 100644 --- a/crypto/armcap.c +++ b/crypto/armcap.c @@ -78,9 +78,10 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor)); # define OSSL_IMPLEMENT_GETAUXVAL # endif # endif -# if defined(__FreeBSD__) +# if defined(__FreeBSD__) || defined(__OpenBSD__) # include -# if __FreeBSD_version >= 1200000 +# if (defined(__FreeBSD__) && __FreeBSD_version >= 1200000) || \ + (defined(__OpenBSD__) && OpenBSD >= 202409) # include # define OSSL_IMPLEMENT_GETAUXVAL diff --git a/crypto/ppccap.c b/crypto/ppccap.c index a38c819d2d..38c08703ae 100644 --- a/crypto/ppccap.c +++ b/crypto/ppccap.c @@ -99,9 +99,10 @@ size_t OPENSSL_instrument_bus2(unsigned int *out, size_t cnt, size_t max) # endif #endif -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) # include -# if __FreeBSD_version >= 1200000 +# if (defined(__FreeBSD__) && __FreeBSD_version >= 1200000) || \ + (defined(__OpenBSD__) && OpenBSD >= 202409) # include # define OSSL_IMPLEMENT_GETAUXVAL