From c6fb349f05cb9221ea6302a67b61679047d89ac8 Mon Sep 17 00:00:00 2001 From: David Gilman Date: Mon, 1 Mar 2021 01:15:26 -0500 Subject: [PATCH] Fix compliation on arm64 Mac with jemalloc (#8458) The arm_thread_state64_get_pc used later in the file is defined in mach kernel headers. Apparently they get included if you use the system malloc but not if you use jemalloc. --- src/debug.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/debug.c b/src/debug.c index a725e5a30..e7fec293a 100644 --- a/src/debug.c +++ b/src/debug.c @@ -54,6 +54,10 @@ typedef ucontext_t sigcontext_t; #endif #endif +#if defined(__APPLE__) && defined(__arm64__) +#include +#endif + /* Globals */ static int bug_report_start = 0; /* True if bug report header was already logged. */ static pthread_mutex_t bug_report_start_mutex = PTHREAD_MUTEX_INITIALIZER;