Handle musl headers without __NR_riscv_hwprobe defined

This commit is contained in:
Cameron Gutman committed 2026-10-22 22:14:04 -05:00
1 parent d79536b56d
commit b709bf5402
1 file changed
+4 -1
+4 -1
View File
@@ -38,7 +38,6 @@
#include <asm/hwprobe.h>
#include <sys/syscall.h>
#else
#define __NR_riscv_hwprobe 258
struct riscv_hwprobe {
int64_t key;
uint64_t value;
@@ -46,6 +45,10 @@ struct riscv_hwprobe {
#define RISCV_HWPROBE_KEY_IMA_EXT_0 4
#endif
#ifndef __NR_riscv_hwprobe
#define __NR_riscv_hwprobe 258
#endif
// RISC-V Scalar AES [E]ncryption and [D]ecryption
#ifndef RISCV_HWPROBE_EXT_ZKND
#define RISCV_HWPROBE_EXT_ZKND (1 << 11)