ports/devel/libsigsegv/patches/patch-src_fault-openbsd-powerpc_h

25 lines
732 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
https://savannah.gnu.org/bugs/?58829
Index: src/fault-openbsd-powerpc.h
--- src/fault-openbsd-powerpc.h.orig
+++ src/fault-openbsd-powerpc.h
2023-09-08 05:21:37 +00:00
@@ -25,9 +25,16 @@
2023-08-16 22:26:55 +00:00
2023-09-08 05:21:37 +00:00
#else /* 32-bit */
2023-08-16 22:26:55 +00:00
-/* See the definition of 'struct sigcontext' and 'struct trapframe' in
- openbsd-src/sys/arch/powerpc/include/signal.h. */
+/* For 32-bit PowerPC, see the definition of 'struct sigcontext' and
+ * 'struct trapframe' in openbsd-src/sys/arch/powerpc/include/signal.h.
+ * For 64-bit PowerPC only 'struct sigcontext' is defined in
+ * openbsd-src/sys/arch/power64/include/signal.h.
+ */
+#ifdef __powerpc64__
+#define SIGSEGV_FAULT_STACKPOINTER scp->sc_sp
+#else
2023-09-08 05:21:37 +00:00
# define SIGSEGV_FAULT_STACKPOINTER scp->sc_frame.fixreg[1]
2023-08-16 22:26:55 +00:00
+#endif
2023-09-08 05:21:37 +00:00
#endif