0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-24 14:16:15 +00:00
termux-packages/disabled-packages/fex/Source-Tools-FEXLoader-ELFCodeLoader.patch
tqfx 740eea08b5
fex: Disabled (#19893)
* bump(main/fex): 202404

* fex: Disabled
  Refer https://wiki.fex-emu.com/index.php/Termux
2024-04-24 20:01:29 +08:00

17 lines
674 B
Diff

diff --git a/Source/Tools/FEXLoader/ELFCodeLoader.h b/Source/Tools/FEXLoader/ELFCodeLoader.h
index ffb5ec1..fdbb098 100644
--- a/Source/Tools/FEXLoader/ELFCodeLoader.h
+++ b/Source/Tools/FEXLoader/ELFCodeLoader.h
@@ -182,7 +182,11 @@ class ELFCodeLoader final : public FEX::CodeLoader {
do {
// This is guaranteed to not be interrupted by a signal,
// since fewer than 256 bytes of RNG data are requested
+#if defined(__ANDROID__) && __ANDROID_API__ < 28
+ Result = syscall(__NR_getrandom, Data, DataSize, 0);
+#else
Result = getrandom(Data, DataSize, 0);
+#endif
} while (Result != -1 && Result != DataSize);
return Result != -1;