From: Aurelien Jarno Date: Thu, 13 Mar 2025 21:31:46 +0000 (+0000) Subject: wrap riscv_hwprobe(2) X-Git-Tag: archive/raspbian/34.1-2+rpi1~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ad5aaa323c1331fc953629d61a3da7a970099977;p=kmod.git wrap riscv_hwprobe(2) Gbp-Pq: Name fix_riscv64_tests --- diff --git a/testsuite/init_module.c b/testsuite/init_module.c index 6d39fdb..45b2273 100644 --- a/testsuite/init_module.c +++ b/testsuite/init_module.c @@ -364,6 +364,19 @@ TS_EXPORT long int syscall(long int __sysno, ...) return nextlib_syscall(__NR_gettid); } +#ifdef __NR_riscv_hwprobe + if (__sysno == __NR_riscv_hwprobe) { + /* + * RISC-V Hardware Probing Interface. This might be used by + * some libraries (e.g. openssl) to probe the hardware + * capabilities. Just pretend the syscall doesn't exist, this + * will just fallback to less optimized code. + */ + errno = ENOSYS; + return -1; + } +#endif + /* * FIXME: no way to call the libc function due since this is a * variadic argument function and we don't have a vsyscall() variant