From 1a13d3ae4e28fc46baef52086c64189f84cf2b9f Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Tue, 19 Mar 2019 00:02:21 +0000 Subject: [PATCH] OpenBSD doesn't have mcontext_t `` provides `typedef struct sigcontext ucontext_t` --- Utilities/Thread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index e66b617900..41fb568c60 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -29,7 +29,9 @@ #endif #include #include +#ifndef __OpenBSD__ #include +#endif #include #include #include @@ -802,7 +804,7 @@ register_t* freebsd_x64reg(x64_context *context, int reg) long* openbsd_x64reg(x64_context *context, int reg) { - auto *state = &context->uc_mcontext; + auto *state = &context; switch(reg) { case 0: return &state->sc_rax;