void-packages/srcpkgs/grep/patches/ppc-musl.patch
2021-08-19 15:48:45 +02:00

14 lines
486 B
Diff

--- 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