From 71f2833f6fca6d59b634f74a7babb0b437893bc8 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Mon, 5 Oct 2020 09:43:29 +1000 Subject: build: some systems have backtrace but not execinfo.h Signed-off-by: Steve Bennett --- auto.def | 2 +- jim.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/auto.def b/auto.def index 7483db2..5781d98 100644 --- a/auto.def +++ b/auto.def @@ -122,7 +122,7 @@ if {[opt-bool coverage]} { } cc-check-includes time.h sys/time.h sys/socket.h netinet/in.h arpa/inet.h netdb.h -cc-check-includes util.h pty.h sys/un.h dlfcn.h unistd.h dirent.h crt_externs.h +cc-check-includes util.h pty.h sys/un.h dlfcn.h unistd.h dirent.h crt_externs.h execinfo.h # Check sizeof time_t so we can warn on non-Y2038 compliance cc-with {-includes time.h} { diff --git a/jim.c b/jim.c index eef1293..d9c7fe0 100644 --- a/jim.c +++ b/jim.c @@ -64,7 +64,7 @@ #ifdef HAVE_SYS_TIME_H #include #endif -#ifdef HAVE_BACKTRACE +#ifdef HAVE_EXECINFO_H #include #endif #ifdef HAVE_CRT_EXTERNS_H @@ -635,7 +635,7 @@ static void JimPanicDump(int condition, const char *fmt, ...) fprintf(stderr, "\n\n"); va_end(ap); -#ifdef HAVE_BACKTRACE +#if defined(HAVE_BACKTRACE) { void *array[40]; int size, i; -- cgit v1.1