re-enable backtraces on linux.

This commit is contained in:
Enno Rehling 2018-03-11 16:52:07 +01:00
parent da984b5880
commit ed46a24f58
3 changed files with 9 additions and 1 deletions

View File

@ -13,9 +13,13 @@ include(MSVC)
set (HAVE_STRDUP 0)
set (HAVE_STRLCAT 0)
set (HAVE_LIBBSD 0)
set (HAVE_SIGNAL_H 0)
set (HAVE_EXECINFO_H 0)
else (MSVC)
INCLUDE (CheckIncludeFile)
CHECK_INCLUDE_FILE(signal.h HAVE_SIGNAL_H)
CHECK_INCLUDE_FILE(execinfo.h HAVE_EXECINFO_H)
CHECK_INCLUDE_FILE(bsd/string.h HAVE_LIBBSD)
INCLUDE (CheckFunctionExists)

View File

@ -261,6 +261,10 @@ add_test(server test_eressea)
install(TARGETS eressea DESTINATION "bin")
if (HAVE_EXECINFO_H AND HAVE_SIGNAL_H)
add_definitions(-DHAVE_BACKTRACE)
endif ()
if (HAVE_LIBBSD)
add_definitions(-DHAVE_LIBBSD)
endif (HAVE_LIBBSD)

View File

@ -257,7 +257,7 @@ static int parse_args(int argc, char **argv)
return 0;
}
#if defined(HAVE_SIGACTION) && defined(HAVE_EXECINFO)
#if defined(HAVE_BACKTRACE)
#include <execinfo.h>
#include <signal.h>