Fix compilation issue on arm64 with Debian's glibc 2.19

Fuchsia's glibc is derived from Debian so it's causing issues on
Fuchsia.

Change-Id: I46368eb08f7cc7338783f115869e5c761f35e465
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2630288
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Dangyi Liu 2021-01-14 21:12:15 +00:00 committed by Commit Bot
parent 0f70d9477e
commit 37dd8f83de

View File

@ -20,8 +20,11 @@
#include <features.h> #include <features.h>
// glibc for 64-bit ARM uses different names for these structs prior to 2.20. // glibc for 64-bit ARM uses different names for these structs prior to 2.20.
// However, Debian's glibc 2.19-8 backported the change so it's not sufficient
// to only test the version. user_pt_regs and user_fpsimd_state are actually
// defined in <asm/ptrace.h> so we use the include guard here.
#if defined(__aarch64__) && defined(__GLIBC__) #if defined(__aarch64__) && defined(__GLIBC__)
#if !__GLIBC_PREREQ(2, 20) #if !__GLIBC_PREREQ(2, 20) && defined(__ASM_PTRACE_H)
using user_regs_struct = user_pt_regs; using user_regs_struct = user_pt_regs;
using user_fpsimd_struct = user_fpsimd_state; using user_fpsimd_struct = user_fpsimd_state;
#endif #endif