mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-15 10:07:56 +08:00
3a20d34ac3
Glibc now defines PTRACE_GET_THREAD_AREA as an enum value. Trying to define our own will result in an error: ../../third_party/crashpad/crashpad/compat/linux/sys/ptrace.h:25:35: error: redefinition of 'PTRACE_GET_THREAD_AREA' as different kind of symbol static constexpr __ptrace_request PTRACE_GET_THREAD_AREA = ^ ../../build/linux/debian_sid_amd64-sysroot/usr/include/x86_64-linux-gnu/sys/ptrace.h:110:3: note: previous definition is here PTRACE_GET_THREAD_AREA = 25, However, glibc also defines a new macro for the corresponding value, so it's possible to detect this case: ----- ptrace.h ----- /* Get a TLS entry in the GDT. */ PTRACE_GET_THREAD_AREA = 25, #define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA ----- ptrace.h ----- This CL prevents defining our own PTRACE_GET_THREAD_AREA when PT_GET_THREAD_AREA is defined. Bug: None Change-Id: Idf931e54dadd57788f04da47f12f0f0588a255cc Reviewed-on: https://chromium-review.googlesource.com/999161 Commit-Queue: Mark Mentovai <mark@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>