39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
From: Anton Bikineev <bikineev@chromium.org>
|
|
Date: Fri, 4 Jun 2021 09:36:01 +0000
|
|
Subject: DCScan: Fix builds with system sysroots
|
|
|
|
If 'use_sysroot=false' is used and the system linux-headers are < 5.8,
|
|
the compilation fails due to undefined 'uffdio_writeprotect'.
|
|
|
|
Bug: 1206047
|
|
Change-Id: Ia73e71b84ea372af49a881f1b14187454bcb4cd8
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2940163
|
|
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
|
|
Commit-Queue: Kentaro Hara <haraken@chromium.org>
|
|
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
|
|
Reviewed-by: Kentaro Hara <haraken@chromium.org>
|
|
Cr-Commit-Position: refs/heads/master@{#889195}
|
|
---
|
|
base/allocator/partition_allocator/partition_alloc_config.h | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/base/allocator/partition_allocator/partition_alloc_config.h b/base/allocator/partition_allocator/partition_alloc_config.h
|
|
--- a/base/allocator/partition_allocator/partition_alloc_config.h
|
|
+++ b/base/allocator/partition_allocator/partition_alloc_config.h
|
|
@@ -36,9 +36,12 @@ static_assert(sizeof(void*) != 8, "");
|
|
|
|
#if defined(PA_HAS_64_BITS_POINTERS) && \
|
|
(defined(OS_LINUX) || defined(OS_ANDROID))
|
|
+#include <linux/version.h>
|
|
// TODO(bikineev): Enable for ChromeOS.
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
|
|
#define PA_STARSCAN_UFFD_WRITE_PROTECTOR_SUPPORTED
|
|
#endif
|
|
+#endif
|
|
|
|
// POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific
|
|
// features such as futex(2).
|
|
--
|
|
2.17.1
|
|
|