From 75ca6a193d34f05fee66290028321a97e0a74910 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Tue, 10 Mar 2020 16:30:20 -0700 Subject: Use public fpregset_t type to define fpstate_t The _libc_fpstate struct tag is an implementation detail of glibc, and musl uses a different struct tag, _fpstate. Unfortunately, the public type fpregset_t is a pointer type, so is not suitable for allocating storage, or referring to constant storage. Instead, we can use std::remove_pointer::type to refer to the pointed-to type, regardless of the struct tag. Bug: google-breakpad:631 Change-Id: Iaf47f15b2d834dd8de839431f65a481e9b0c7f9e Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2096171 Reviewed-by: Mike Frysinger --- src/client/linux/minidump_writer/minidump_writer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/linux/minidump_writer') diff --git a/src/client/linux/minidump_writer/minidump_writer.h b/src/client/linux/minidump_writer/minidump_writer.h index d1dc3312..e3b0b16d 100644 --- a/src/client/linux/minidump_writer/minidump_writer.h +++ b/src/client/linux/minidump_writer/minidump_writer.h @@ -36,6 +36,7 @@ #include #include +#include #include #include "client/linux/minidump_writer/linux_dumper.h" @@ -48,7 +49,7 @@ class ExceptionHandler; #if defined(__aarch64__) typedef struct fpsimd_context fpstate_t; #elif !defined(__ARM_EABI__) && !defined(__mips__) -typedef struct _libc_fpstate fpstate_t; +typedef std::remove_pointer::type fpstate_t; #endif // These entries store a list of memory regions that the client wants included -- cgit v1.2.1