summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-08-09 16:21:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-08-10 11:49:00 +0000
commitb12ffcd411d4776f7120ccecb3be34344d930d2b (patch)
tree6ff9322c4ff628f812ccc0044f517246054cf942
parent22eeb994c61f51695f850bc5d075a42680c10d45 (diff)
Do not depend on Linux 4.5
Avoid using MADV_FREE that was only recently added to Linux. It will fail when run on older Linux kernels. Change-Id: I9b0369fb31402f088b2327c12f70dd39f5e4c8c0 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
-rw-r--r--chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp b/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp
index 121b6872ab3..be7c3b9c2f9 100644
--- a/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp
+++ b/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp
@@ -39,6 +39,11 @@
#include <sys/mman.h>
+#if OS(LINUX) && defined(MADV_FREE)
+// Added in Linux 4.5, but we don't want to depend on 4.5 at runtime
+#undef MADV_FREE
+#endif
+
#ifndef MADV_FREE
#define MADV_FREE MADV_DONTNEED
#endif