Fix build on powerpc64 by correcting the stack pointer definition Index: lib/sigsegv.c --- lib/sigsegv.c.orig +++ lib/sigsegv.c @@ -223,7 +223,6 @@ int libsigsegv_version = LIBSIGSEGV_VERSION; the 'struct sigcontext' defined in , and the 'struct pt_regs' defined in are quite different types. */ - # if defined __powerpc64__ || defined __powerpc64_elfv2__ /* 64-bit */ # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1] # else /* 32-bit */ @@ -608,7 +607,11 @@ int libsigsegv_version = LIBSIGSEGV_VERSION; /* See the definition of 'struct sigcontext' and 'struct trapframe' in openbsd-src/sys/arch/powerpc/include/signal.h. */ -# define SIGSEGV_FAULT_STACKPOINTER scp->sc_frame.fixreg[1] +# ifdef __powerpc64__ +# define SIGSEGV_FAULT_STACKPOINTER scp->sc_sp +# else +# define SIGSEGV_FAULT_STACKPOINTER scp->sc_frame.fixreg[1] +# endif # elif defined __sh__