diff options
author | Gustavo Romero <gromero@br.ibm.com> | 2017-03-29 19:10:59 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-03-29 20:15:45 +0000 |
commit | 70e8624cec8394b1517a6a0dcba72bbb0c9b9e74 (patch) | |
tree | be4ae6b582b48c608e8def2160678f0766daaec9 /main/strace/fix-ppc-pt-regs-collision.patch | |
parent | 995ff2aa9e9ad92979864eb3d23884eb90952793 (diff) | |
download | aports-70e8624cec8394b1517a6a0dcba72bbb0c9b9e74.tar.bz2 aports-70e8624cec8394b1517a6a0dcba72bbb0c9b9e74.tar.xz |
main/strace: fix pt_regs collision on ppc64le
strace build requires <linux/ptrace.h> and it includes <asm/ptrace.h>
that, by its turn, defines the pt_regs struct. However the same struct
is also define in <bits/user.h> from musl-dev, creating therefore a
conflict. A solution is to add the __ASSEMBLY__ guard so pt_regs struct
from <asm/ptrace.h> is not include twice, avoiding the collision in
question.
There is no other way to worki around that issue on Musl since it does
not include the linux headers and hence has to define again the pt_regs
struct in user.h and the name clashes. In glibc, for instance, user.h
includes <asm/ptrace.h> from kernel and does not redefine it.
Also Musl community has no better solution at the moment for this issue
on ppc, so basically nothing change since [1].
[1] http://www.openwall.com/lists/musl/2016/12/30/5
Diffstat (limited to 'main/strace/fix-ppc-pt-regs-collision.patch')
-rw-r--r-- | main/strace/fix-ppc-pt-regs-collision.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/main/strace/fix-ppc-pt-regs-collision.patch b/main/strace/fix-ppc-pt-regs-collision.patch new file mode 100644 index 0000000000..6de0fcdd6f --- /dev/null +++ b/main/strace/fix-ppc-pt-regs-collision.patch @@ -0,0 +1,19 @@ +--- a/ptrace.h ++++ b/ptrace.h +@@ -48,7 +48,15 @@ + # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args + #endif + +-#include <linux/ptrace.h> ++#if defined(__powerpc__) || defined(__powerpc64__) ++# include <linux/types.h> ++# define __ASSEMBLY__ ++# include <linux/ptrace.h> ++# undef __ASSEMBLY__ ++#else ++# include <linux/ptrace.h> ++#endif ++ + + #ifdef HAVE_STRUCT_IA64_FPREG + # undef ia64_fpreg |