Skip to content

Commit

Permalink
Fix builds on riscv64 using musl
Browse files Browse the repository at this point in the history
Some environments using musl are reported to have the hwprobe.h include
file but not have the __NR_riscv_hwprobe define.

Fixes openssl#25772

Reviewed-by: Viktor Dukhovni <[email protected]>
Reviewed-by: Ben Kaduk <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Todd Short <[email protected]>
(Merged from openssl#25787)
  • Loading branch information
mattcaswell authored and tmshort committed Oct 28, 2024
1 parent f30d6ba commit 27fa9d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/crypto/riscv_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 27fa9d3

Please sign in to comment.