ports/graphics/gmt/files/patch-src_gmt__common__sighandler.c
Robert Clausecker a5783589a6 graphics/gmt: fix build on armv7
Fix wrong code for armv7 mcontext_t PC retrieval.

Approved by:	portmgr (build fix blanket)
MFH:		2023Q3
2023-07-31 01:59:08 +03:00

11 lines
515 B
C

--- src/gmt_common_sighandler.c.orig 2023-07-28 19:57:48 UTC
+++ src/gmt_common_sighandler.c
@@ -84,7 +84,7 @@ void backtrace_symbols_fd(void *const *buffer, int siz
# ifdef __x86_64__
# define UC_IP(uc) ((void *) (uc)->uc_mcontext.mc_rip)
# elif defined( __arm__)
-# define UC_IP(uc) ((void *) (uc)->uc_mcontext.arm_pc)
+# define UC_IP(uc) ((void *) (uc)->uc_mcontext.__gregs[_REG_PC])
# elif defined( __aarch64__)
# define UC_IP(uc) ((void *) (uc)->uc_mcontext.mc_gpregs.gp_elr)
# elif defined(__ppc__)