void-packages/srcpkgs/ocaml/patches/ocaml-4.04.2-sigcontext.patch
2019-01-27 13:15:20 -02:00

19 lines
778 B
Diff

--- ocaml-4.04.2/asmrun/signals_osdep.h
+++ ocaml-4.04.2/asmrun/signals_osdep.h
@@ -297,11 +297,11 @@
sigact.sa_flags = 0
typedef unsigned long context_reg;
- #define CONTEXT_PC (context->regs->nip)
- #define CONTEXT_EXCEPTION_POINTER (context->regs->gpr[29])
- #define CONTEXT_YOUNG_LIMIT (context->regs->gpr[30])
- #define CONTEXT_YOUNG_PTR (context->regs->gpr[31])
- #define CONTEXT_SP (context->regs->gpr[1])
+ #define CONTEXT_PC (context->gp_regs[32])
+ #define CONTEXT_EXCEPTION_POINTER (context->gp_regs[29])
+ #define CONTEXT_YOUNG_LIMIT (context->gp_regs[30])
+ #define CONTEXT_YOUNG_PTR (context->gp_regs[31])
+ #define CONTEXT_SP (context->gp_regs[1])
/****************** s390x, ELF (Linux) */
#elif defined(TARGET_s390x) && defined(SYS_elf)