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)
# 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