commit: 5c95a4a832157104ea5e5307faf0bdf1bb59a1c4
Author: Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 5 21:42:53 2017 +0000
Commit: Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
CommitDate: Thu Jan 5 21:46:47 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c95a4a8
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.
www-client/chromium/chromium-56.0.2924.21.ebuild | 3 ++-
www-client/chromium/files/chromium-glibc-2.24.patch | 15 +++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/www-client/chromium/chromium-56.0.2924.21.ebuild
b/www-client/chromium/chromium-56.0.2924.21.ebuild
index edaa776..17cd0d0 100644
--- a/www-client/chromium/chromium-56.0.2924.21.ebuild
+++ b/www-client/chromium/chromium-56.0.2924.21.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -163,6 +163,7 @@ PATCHES=(
"${FILESDIR}/${PN}-system-ffmpeg-r4.patch"
"${FILESDIR}/${PN}-system-jinja-r14.patch"
"${FILESDIR}/${PN}-widevine-r1.patch"
+ "${FILESDIR}/${PN}-glibc-2.24.patch"
)
pre_build_checks() {
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 00000000..f7bfd81
--- /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);