summaryrefslogtreecommitdiff
path: root/dev-util/electron/files/chromium-glibc-2.24.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/electron/files/chromium-glibc-2.24.patch
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/electron/files/chromium-glibc-2.24.patch')
-rw-r--r--dev-util/electron/files/chromium-glibc-2.24.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/dev-util/electron/files/chromium-glibc-2.24.patch b/dev-util/electron/files/chromium-glibc-2.24.patch
new file mode 100644
index 000000000000..f7bfd816433f
--- /dev/null
+++ b/dev-util/electron/files/chromium-glibc-2.24.patch
@@ -0,0 +1,15 @@
+--- a/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp.orig 2017-01-05 20:50:56.329369189 +0000
++++ b/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp 2017-01-05 20:51:32.926099779 +0000
+@@ -242,6 +242,12 @@
+ ASSERT(!(len & kSystemPageOffsetMask));
+ #if OS(POSIX)
+ int ret = madvise(addr, len, MADV_FREE);
++ if (ret != 0 && errno == EINVAL) {
++ // MADV_FREE only works on Linux 4.5+ . If request failed,
++ // retry with older MADV_DONTNEED . Note that MADV_FREE
++ // being defined at compile time doesn't imply runtime support.
++ ret = madvise(addr, len, MADV_DONTNEED);
++ }
+ RELEASE_ASSERT(!ret);
+ #else
+ setSystemPagesInaccessible(addr, len);