0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-06-05 08:11:16 +00:00
Files
termux-packages/x11-packages/electron-host-tools-for-code-oss/cr-patches/1021-chromium-partition-allocator-memfd.patch

29 lines
989 B
Diff

--- a/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc
+++ b/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc
@@ -36,6 +36,11 @@
#include <sys/mman.h>
#endif
+#if defined(__ANDROID__) && __ANDROID_API__ < 30
+#include <sys/syscall.h>
+#define memfd_create(name,flags) syscall(SYS_memfd_create,name,flags)
+#endif
+
namespace partition_alloc::internal {
#if PA_BUILDFLAG(HAS_64_BIT_POINTERS)
--- a/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
+++ b/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
@@ -51,6 +51,11 @@
#endif // PA_CONFIG(ENABLE_SHADOW_METADATA)
#endif // PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS)
+#if defined(__ANDROID__) && __ANDROID_API__ < 30
+#include <sys/syscall.h>
+#define memfd_create(name,flags) syscall(SYS_memfd_create,name,flags)
+#endif
+
namespace partition_alloc::internal {
#if PA_BUILDFLAG(RECORD_ALLOC_INFO)