Fix the Chromium build on ChromeOS for aarch64

PTRACE_GET_THREAD_AREA is only removed from the newer version of glibc (>=2.28)
for aarch64. Since ChromeOS uses 2.23 version of glibc currently,
so it should be handled in crashpad to avoid the redefinition.

BUG=chromium:873168

Change-Id: I8da6bc0595b814b0490b38da6f4a68e6803bb5b9
Reviewed-on: https://chromium-review.googlesource.com/1188309
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Adam Kallai 2018-08-24 16:05:10 +02:00 committed by Commit Bot
parent 5c6e19f000
commit 7198015c73

View File

@ -26,7 +26,8 @@
static constexpr __ptrace_request PTRACE_GET_THREAD_AREA =
static_cast<__ptrace_request>(25);
#define PTRACE_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
#elif defined(__arm__) || defined(__aarch64__)
// https://bugs.chromium.org/p/chromium/issues/detail?id=873168
#elif defined(__arm__) || (defined(__aarch64__) && __GLIBC_PREREQ(2,28))
static constexpr __ptrace_request PTRACE_GET_THREAD_AREA =
static_cast<__ptrace_request>(22);
#define PTRACE_GET_THREAD_AREA PTRACE_GET_THREAD_AREA