From 9c7678966f48353af2f9dd2adc38ed48a1c3951f Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Thu, 4 Feb 2021 22:53:24 -0500 Subject: [PATCH] Fix the osx arm64 build. --- src/mono/mono/utils/mono-sigcontext.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mono/mono/utils/mono-sigcontext.h b/src/mono/mono/utils/mono-sigcontext.h index 699af6e37d1fb..44fcf32888c45 100644 --- a/src/mono/mono/utils/mono-sigcontext.h +++ b/src/mono/mono/utils/mono-sigcontext.h @@ -474,6 +474,9 @@ typedef struct ucontext { #else #define UCONTEXT_REG_PC(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__pc) #define UCONTEXT_REG_SP(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__sp) +#define UCONTEXT_REG_SET_PC(ctx, val) do { \ + UCONTEXT_REG_PC (ctx) = (__uint64_t)(val); \ + } while (0) #endif #define UCONTEXT_REG_R0(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__x [ARMREG_R0]) @@ -497,6 +500,8 @@ typedef struct ucontext { #define UCONTEXT_REG_SET_PC(ctx, val) do { \ UCONTEXT_REG_PC (ctx) = (val); \ } while (0) +#endif +#ifndef UCONTEXT_REG_SET_SP #define UCONTEXT_REG_SET_SP(ctx, val) do { \ UCONTEXT_REG_SP (ctx) = (val); \ } while (0)