mirror of
https://github.com/termux/termux-packages.git
synced 2025-05-10 13:55:33 +00:00
24 lines
670 B
Diff
24 lines
670 B
Diff
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -632,7 +632,7 @@
|
|
cdata.set('HAVE_SYS_RANDOM', 1)
|
|
elif cc.has_header_symbol('linux/random.h', 'getrandom')
|
|
cdata.set('HAVE_LINUX_RANDOM', 1)
|
|
- else
|
|
+ elif host_machine.system() != 'android'
|
|
error('Required function getrandom not found')
|
|
endif
|
|
|
|
--- a/src/wayland/meta-xwayland.c
|
|
+++ b/src/wayland/meta-xwayland.c
|
|
@@ -36,6 +36,9 @@
|
|
#include <sys/random.h>
|
|
#elif defined(HAVE_LINUX_RANDOM)
|
|
#include <linux/random.h>
|
|
+#elif defined(__ANDROID__)
|
|
+#include <syscall.h>
|
|
+#define getrandom(buf,buflen,flags) syscall(SYS_getrandom,buf,buflen,flags)
|
|
#endif
|
|
#include <unistd.h>
|
|
#include <X11/extensions/Xrandr.h>
|