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 simple solution is to add the __ASSEMBLY__ guard so pt_regs
struct from <asm/ptrace.h> is not include twice, avoiding the collision
in question.
This commit is contained in:
Gustavo Romero 2017-01-23 17:09:01 +00:00 committed by Jakub Jirutka
parent 37ee755601
commit 56605661d6
2 changed files with 23 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=strace
pkgver=4.15
pkgrel=0
pkgrel=1
pkgdesc="A useful diagnositic, instructional, and debugging tool"
url="http://sourceforge.net/projects/strace/"
arch="all"
@ -9,7 +9,9 @@ license="BSD"
depends=
makedepends="linux-headers"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.xz"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.xz
fix-pt_regs-collisions-ppc64le.patch
"
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
@ -41,6 +43,9 @@ package() {
make -j1 DESTDIR="$pkgdir" install
}
md5sums="1ff96209fec19914c920608ed0791864 strace-4.15.tar.xz"
sha256sums="c0cdc094d6141fd9dbf6aaad605142d651ae10998b660fda57fc61f7ad583ca9 strace-4.15.tar.xz"
sha512sums="15e96c31d901c94dc40de67a65365c6cc9a7b7b2bf96a735f5d20cbd54dc75d941e0c1da206aa76f6e98d1013bfeecb42800b23c9e146eaf756775d525fe1b66 strace-4.15.tar.xz"
md5sums="1ff96209fec19914c920608ed0791864 strace-4.15.tar.xz
c30591d11e884e6b00315e3ef0dbf813 fix-pt_regs-collisions-ppc64le.patch"
sha256sums="c0cdc094d6141fd9dbf6aaad605142d651ae10998b660fda57fc61f7ad583ca9 strace-4.15.tar.xz
a939a24ef6b8e942632a5f5d652ceab7bf66740da7118149e174995e7f03b7b6 fix-pt_regs-collisions-ppc64le.patch"
sha512sums="15e96c31d901c94dc40de67a65365c6cc9a7b7b2bf96a735f5d20cbd54dc75d941e0c1da206aa76f6e98d1013bfeecb42800b23c9e146eaf756775d525fe1b66 strace-4.15.tar.xz
7f27479d9556e41d188659978576db242b638792639e821b77bcbb78e5a19dbc5b35cb3966146180712056f745bfa77f6ecfbcaedf9a650e5b7d9c25b13650a3 fix-pt_regs-collisions-ppc64le.patch"

View File

@ -0,0 +1,13 @@
--- a/ptrace.h
+++ b/ptrace.h
@@ -55,7 +55,10 @@
# define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
#endif
+#include <linux/types.h>
+#define __ASSEMBLY__
#include <linux/ptrace.h>
+#undef __ASSEMBLY__
#ifdef HAVE_STRUCT_IA64_FPREG
# undef ia64_fpreg