summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Hajdan, Jr <phajdan.jr@gentoo.org>2017-01-05 21:42:53 +0000
committerPawel Hajdan, Jr <phajdan.jr@gentoo.org>2017-01-05 22:46:47 +0100
commit5c95a4a832157104ea5e5307faf0bdf1bb59a1c4 (patch)
treec52726795ff54497013af9133f1b887afe087e76 /www-client/chromium/files/chromium-glibc-2.24.patch
parentdev-php/phpdepend: remove unused versions 1.1.1 and 2.2.2. (diff)
downloadgentoo-5c95a4a832157104ea5e5307faf0bdf1bb59a1c4.tar.gz
gentoo-5c95a4a832157104ea5e5307faf0bdf1bb59a1c4.tar.bz2
gentoo-5c95a4a832157104ea5e5307faf0bdf1bb59a1c4.zip
www-client/chromium: fix build with glibc-2.24
This addresses bug #594070 by iGentoo . The issue has already been fixed upstream for M57, this is a backport.
Diffstat (limited to 'www-client/chromium/files/chromium-glibc-2.24.patch')
-rw-r--r--www-client/chromium/files/chromium-glibc-2.24.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-glibc-2.24.patch b/www-client/chromium/files/chromium-glibc-2.24.patch
new file mode 100644
index 000000000000..f7bfd816433f
--- /dev/null
+++ b/www-client/chromium/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);