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 <viktor@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/25787)
This commit is contained in:
Matt Caswell 2024-10-23 14:57:20 +01:00 committed by Todd Short
parent f30d6ba455
commit 27fa9d33e1

View File

@ -15,7 +15,14 @@
# if defined(OPENSSL_SYS_LINUX) && !defined(FIPS_MODULE)
# if __has_include(<asm/hwprobe.h>)
# define OSSL_RISCV_HWPROBE
# include <sys/syscall.h>
# /*
* 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