Files
termux-packages/x11-packages/libneatvnc/0001-getrandom.patch
termux-pacman-bot 59f4499068 bump(x11/libneatvnc): 0.9.0
Rebase 0001-getrandom.patch file which was changed in
38a16e5516
2024-11-19 18:41:38 +00:00

15 lines
365 B
Diff

--- a/src/crypto/random.c
+++ b/src/crypto/random.c
@@ -21,6 +21,11 @@
// TODO: This is linux specific
#include <sys/random.h>
+#if defined(__ANDROID__) && __ANDROID_API__ < 28
+#include <syscall.h>
+#define getrandom(buf,buflen,flags) syscall(SYS_getrandom,buf,buflen,flags)
+#endif
+
void crypto_random(uint8_t* dst, size_t len)
{
getrandom(dst, len, 0);