From: Matt Caswell Date: Wed, 23 Oct 2024 13:57:20 +0000 (+0100) Subject: Fix builds on riscv64 using musl X-Git-Tag: openssl-3.5.0-alpha1~962 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27fa9d33e1355ae1ef1c0a072f9b511858dfef85;p=thirdparty%2Fopenssl.git Fix builds on riscv64 using musl Some environments using musl are reported to have the hwprobe.h include file but not have the __NR_riscv_hwprobe define. Fixes #25772 Reviewed-by: Viktor Dukhovni Reviewed-by: Ben Kaduk Reviewed-by: Paul Dale Reviewed-by: Todd Short (Merged from https://github.com/openssl/openssl/pull/25787) --- diff --git a/include/crypto/riscv_arch.h b/include/crypto/riscv_arch.h index 4b3573f5a34..885842763d9 100644 --- a/include/crypto/riscv_arch.h +++ b/include/crypto/riscv_arch.h @@ -15,7 +15,14 @@ # if defined(OPENSSL_SYS_LINUX) && !defined(FIPS_MODULE) # if __has_include() -# define OSSL_RISCV_HWPROBE +# include +# /* + * Some environments using musl are reported to have the hwprobe.h include + * file but not have the __NR_riscv_hwprobe define. + */ +# ifdef __NR_riscv_hwprobe +# define OSSL_RISCV_HWPROBE +# endif # endif # endif