From 222ef005ed03d777c167a26b6852952b8c35eaf1 Mon Sep 17 00:00:00 2001 From: "rmcilroy@chromium.org" Date: Wed, 14 May 2014 09:49:24 +0000 Subject: Fix x86_64 Android build after user_fpregs_struct was added to /sys/user.h in newer NDKs BUG=346626 TBR=mark@chromium.org Review URL: https://breakpad.appspot.com/2694002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1331 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/android/include/sys/user.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/android/include/sys/user.h b/src/common/android/include/sys/user.h index 40567416..5825a3ef 100644 --- a/src/common/android/include/sys/user.h +++ b/src/common/android/include/sys/user.h @@ -192,13 +192,18 @@ struct user_fpregs_struct { }; #elif defined(__x86_64__) -#include + +// Bionic's user_fpregs_struct calls the tag word twd instead of ftw. To avoid +// changing lots of Bionic, uUse an ugly macro renaming trick with +// #include_next. +// TODO(rmcilroy): Remove when NDK headers are fixed. +#define user_fpregs_struct __bionic_user_fpregs_struct #include_next +#undef user_fpregs_struct -// This struct is essentially the same as user_i387_struct in sys/user.h +// This struct is the same as user_fpregs_struct in Bionic's sys/user.h // except that the struct name and individual field names are chosen here // to match the ones used in breakpad for other x86_64 platforms. - struct user_fpregs_struct { __u16 cwd; __u16 swd; -- cgit v1.2.1