diff options
author | David Gilman <davidgilman1@gmail.com> | 2021-03-01 01:15:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 08:15:26 +0200 |
commit | 1bf02e1ca9bdb95bb37d806800c356ef13afd001 (patch) | |
tree | 94ae681b21c95aa31a3ef07e4a28e645a1ec58dc | |
parent | a66814fd7ac2b37cefb43f2ec03dd8684ebcccf2 (diff) | |
download | redis-1bf02e1ca9bdb95bb37d806800c356ef13afd001.tar.gz |
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.
-rw-r--r-- | src/debug.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 <mach/mach.h> +#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; |