0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-27 06:18:57 +00:00
termux-packages/x11-packages/qt5-qtwebengine/0012-crashpad-no-memfd.patch
2023-01-06 21:22:56 +00:00

23 lines
670 B
Diff

--- a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/file/file_io_posix.cc
+++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/file/file_io_posix.cc
@@ -19,6 +19,7 @@
#include <sys/file.h>
#include <sys/mman.h>
#include <sys/stat.h>
+#include <sys/syscall.h>
#include <unistd.h>
#include <algorithm>
@@ -154,6 +155,11 @@
}
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
+
+#if defined __ANDROID__ && __ANDROID_API__ < 30
+#define memfd_create(name,flags) syscall(SYS_memfd_create,name,flags)
+#endif
+
FileHandle LoggingOpenMemoryFileForReadAndWrite(const base::FilePath& name) {
DCHECK(name.value().find('/') == std::string::npos);