mirror of
https://github.com/termux/termux-packages.git
synced 2025-09-26 02:15:01 +00:00
16 lines
407 B
Diff
16 lines
407 B
Diff
--- a/lib/bpf/src/linker.c
|
|
+++ b/lib/bpf/src/linker.c
|
|
@@ -29,6 +29,12 @@
|
|
|
|
#define BTF_EXTERN_SEC ".extern"
|
|
|
|
+#if defined(__ANDROID__) && __ANDROID_API__ < 30
|
|
+#include <linux/memfd.h>
|
|
+#include <sys/syscall.h>
|
|
+#define memfd_create(name,flags) syscall(SYS_memfd_create,name,flags)
|
|
+#endif
|
|
+
|
|
struct src_sec {
|
|
const char *sec_name;
|
|
/* positional (not necessarily ELF) index in an array of sections */
|