summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-11-16 18:30:26 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-11-16 18:39:07 -0800
commite4bc420f6f7ad5d52e43f2ae7541a991f516949e (patch)
tree1605b68854d5460657ff6d14fbd153792cff20a8 /sys-apps/grep
parentsys-devel/m4: add ppc32 musl patch (diff)
downloadgentoo-e4bc420f6f7ad5d52e43f2ae7541a991f516949e.tar.gz
gentoo-e4bc420f6f7ad5d52e43f2ae7541a991f516949e.tar.bz2
gentoo-e4bc420f6f7ad5d52e43f2ae7541a991f516949e.zip
sys-apps/grep: add ppc32 musl patch
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sys-apps/grep')
-rw-r--r--sys-apps/grep/files/ppc-musl.patch14
-rw-r--r--sys-apps/grep/grep-3.7.ebuild2
2 files changed, 16 insertions, 0 deletions
diff --git a/sys-apps/grep/files/ppc-musl.patch b/sys-apps/grep/files/ppc-musl.patch
new file mode 100644
index 000000000000..6ba37f233591
--- /dev/null
+++ b/sys-apps/grep/files/ppc-musl.patch
@@ -0,0 +1,14 @@
+--- a/lib/sigsegv.c
++++ b/lib/sigsegv.c
+@@ -221,8 +221,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
+ /* both should be equivalent */
+ # if 0
+ # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
+-# else
++# elif defined(__GLIBC__)
+ # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
++# else
++# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1]
+ # endif
+ # endif
+
diff --git a/sys-apps/grep/grep-3.7.ebuild b/sys-apps/grep/grep-3.7.ebuild
index 7b142e4d63d8..2a4b293b29e0 100644
--- a/sys-apps/grep/grep-3.7.ebuild
+++ b/sys-apps/grep/grep-3.7.ebuild
@@ -29,6 +29,8 @@ BDEPEND="
nls? ( sys-devel/gettext )
"
+PATCHES=( "${FILESDIR}/ppc-musl.patch" )
+
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
src_prepare() {