From f863e5a65963da6621a262f48ef9432585bba5a1 Mon Sep 17 00:00:00 2001 From: Mikael Urankar Date: Mon, 18 Oct 2021 08:20:57 +0200 Subject: lang/mono: Fix build on aarch64. Approved by: portmgr (build fix blanket) --- lang/mono/files/patch-mono_utils_mono-sigcontext.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lang/mono/files/patch-mono_utils_mono-sigcontext.h') diff --git a/lang/mono/files/patch-mono_utils_mono-sigcontext.h b/lang/mono/files/patch-mono_utils_mono-sigcontext.h index 22cf2458435d..f208802581d0 100644 --- a/lang/mono/files/patch-mono_utils_mono-sigcontext.h +++ b/lang/mono/files/patch-mono_utils_mono-sigcontext.h @@ -15,3 +15,17 @@ #endif #elif defined(TARGET_ARM) +@@ -460,6 +460,13 @@ typedef struct ucontext { + #define UCONTEXT_REG_SP(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__sp) + #define UCONTEXT_REG_R0(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__x [ARMREG_R0]) + #define UCONTEXT_GREGS(ctx) (&(((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__x)) ++#elif defined(__FreeBSD__) ++#include ++ /* https://lists.freebsd.org/pipermail/freebsd-arm/2017-February/015611.html */ ++ #define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_elr) ++ #define UCONTEXT_REG_SP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_sp) ++ #define UCONTEXT_REG_R0(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_x [ARMREG_R0]) ++ #define UCONTEXT_GREGS(ctx) (&(((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_x)) + #else + #include + #define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.pc) -- cgit v1.2.3