From a7538371fec595641bed2d5e2d92e5ae2ce89b94 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 30 Jul 2017 23:02:41 +0200 Subject: build: linux does not always have execinfo.h (#7101) Closes #7099 --- src/nvim/log.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/nvim/log.c') diff --git a/src/nvim/log.c b/src/nvim/log.c index 252fe5438d..b64aef3cac 100644 --- a/src/nvim/log.c +++ b/src/nvim/log.c @@ -25,6 +25,10 @@ static uv_mutex_t mutex; # include "log.c.generated.h" #endif +#ifdef HAVE_EXECINFO_BACKTRACE +# include +#endif + static bool log_try_create(char *fname) { if (fname == NULL || fname[0] == '\0') { @@ -173,8 +177,7 @@ FILE *open_log_file(void) return stderr; } -#if defined(__linux__) -# include +#ifdef HAVE_EXECINFO_BACKTRACE void log_callstack(const char *const func_name, const int line_num) { void *trace[100]; -- cgit