1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-18 13:21:11 +00:00
termux-packages/packages/waypipe/src-platform.c.patch
2022-03-30 06:27:13 +09:00

14 lines
391 B
Diff

--- a/src/platform.c
+++ b/src/platform.c
@@ -50,6 +50,10 @@
#if defined(__linux__)
/* memfd_create was introduced in glibc 2.27 */
#if !defined(__GLIBC__) || (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 27)
+#if defined __ANDROID__ && __ANDROID_API__ < 30
+#include <syscall.h>
+#define memfd_create(name,flags) syscall(SYS_memfd_create,name,flags)
+#endif
#define HAS_MEMFD 1
#endif
#endif