From 1901bc7c766d79fb6baa7571fca8951fc80a8eb0 Mon Sep 17 00:00:00 2001 From: tezc Date: Sat, 15 May 2021 14:39:51 +0300 Subject: [PATCH] get backtrace pointer for only MAC_OS_X_VERSION_10_6 --- signal/sc_signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/signal/sc_signal.c b/signal/sc_signal.c index 4b5f879..cdd6b7a 100644 --- a/signal/sc_signal.c +++ b/signal/sc_signal.c @@ -331,13 +331,13 @@ static void *sc_instruction(ucontext_t *uc) (void) uc; void *p = NULL; -#if defined(__APPLE__) +#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6) #if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__) p = (void *) uc->uc_mcontext->__ss.__rip; #elif defined(__i386__) p = (void *) uc->uc_mcontext->__ss.__eip; #else - p = (void *) arm_thread_state64_get_pc(uc->uc_mcontext->__ss); + p = (void *) (uintptr_t) arm_thread_state64_get_pc(uc->uc_mcontext->__ss); #endif #elif defined(__linux__) #if defined(__i386__) || ((defined(__x86_64__)) && defined(__ILP32__))