From 66b0aca0f15519e06561802e093e839c952c7ffa Mon Sep 17 00:00:00 2001
From: Robert Izzard <r.izzard@surrey.ac.uk>
Date: Wed, 11 Dec 2019 17:48:55 +0000
Subject: [PATCH] on mac osx change location of ucontext.h

---
 src/binary_c_code_options.h | 4 ++++
 src/debug/backtrace.c       | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/binary_c_code_options.h b/src/binary_c_code_options.h
index 91670ecbd..6dc83abe0 100644
--- a/src/binary_c_code_options.h
+++ b/src/binary_c_code_options.h
@@ -35,7 +35,11 @@
 #include <signal.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef DARWIN
+#include <sys/ucontext.h>
+#else
 #include <ucontext.h>
+#endif //DARWIN
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/time.h>
diff --git a/src/debug/backtrace.c b/src/debug/backtrace.c
index 4eaa9bee9..fff789ec7 100644
--- a/src/debug/backtrace.c
+++ b/src/debug/backtrace.c
@@ -7,7 +7,11 @@
 #define __USE_GNU
 #endif
 
+#ifdef DARWIN
+#include <sys/ucontext.h>
+#else
 #include <ucontext.h>
+#endif //DARWIN
 #include <execinfo.h>
 #include <signal.h>
 #include <stdio.h>
-- 
GitLab