diff --git a/srcpkgs/ppsspp/patches/riscv-musl.patch b/srcpkgs/ppsspp/patches/riscv-musl.patch new file mode 100644 index 00000000000..16b4c322553 --- /dev/null +++ b/srcpkgs/ppsspp/patches/riscv-musl.patch @@ -0,0 +1,23 @@ +--- a/Common/RiscVEmitter.cpp 2024-02-04 14:08:02.000000000 +0100 ++++ - 2024-02-16 16:49:35.344381020 +0100 +@@ -20,6 +20,7 @@ + #include + #if PPSSPP_ARCH(RISCV64) && PPSSPP_PLATFORM(LINUX) + #include ++#include + #endif + #include "Common/BitScan.h" + #include "Common/CPUDetect.h" +@@ -1139,8 +1140,12 @@ + void RiscVEmitter::FlushIcacheSection(const u8 *start, const u8 *end) { + #if PPSSPP_ARCH(RISCV64) + #if PPSSPP_PLATFORM(LINUX) ++#ifdef __GLIBC__ + __riscv_flush_icache((char *)start, (char *)end, 0); + #else ++ syscall(__NR_riscv_flush_icache, (char*)start, (char*)end, 0UL); ++#endif ++#else + // TODO: This might only correspond to a local hart icache clear, which is no good. + __builtin___clear_cache((char *)start, (char *)end); + #endif