summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/crypto/riscv_arch.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/crypto/riscv_arch.h b/include/crypto/riscv_arch.h
index 4b3573f5a3..885842763d 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(<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