blob: f2b55a58e591ff33ef6fd9d04ed91dfdef665ba8 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001--- a/lib/sigsegv.c
2+++ b/lib/sigsegv.c
3@@ -244,8 +244,8 @@ int libsigsegv_version = LIBSIGSEGV_VERS
4 /* Assume the structure of ucontext_t in
5 glibc/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h. */
6 /* Because of the union, both definitions should be equivalent. */
7-# if 0
8-# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
9+# ifndef __GLIBC__
10+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1]
11 # else
12 # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
13 # endif