b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | --- 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 |