SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
26
textproc/gdiff/patches/patch-lib_sigsegv_c
Normal file
26
textproc/gdiff/patches/patch-lib_sigsegv_c
Normal file
|
@ -0,0 +1,26 @@
|
|||
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 <asm/sigcontext.h>,
|
||||
and the 'struct pt_regs' defined in <asm/ptrace.h>
|
||||
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__
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue