0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-11 13:09:18 +00:00
termux-packages/x11-packages/libneatvnc/0001-getrandom.patch
2023-10-20 03:20:08 +08:00

15 lines
352 B
Diff

--- a/src/crypto-nettle.c
+++ b/src/crypto-nettle.c
@@ -24,6 +24,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
+
#define UDIV_UP(a, b) (((a) + (b) - 1) / (b))
struct vec;