3 @@ -11,7 +11,9 @@ in the source distribution for its full
7 +#ifdef HAVE_EXECINFO_H
13 @@ -125,12 +127,14 @@ static void CRT_handleSIGSEGV(int sgn) {
16 fprintf(stderr, "\n\nhtop " VERSION " aborting. Please report bug at http://htop.sf.net\n");
18 - fprintf(stderr, "\n\nhtop " VERSION " aborting. Unsupported platform.\n");
20 + #ifdef HAVE_EXECINFO_H
21 size_t size = backtrace(backtraceArray, sizeof(backtraceArray));
22 fprintf(stderr, "Backtrace: \n");
23 backtrace_symbols_fd(backtraceArray, size, 2);
26 + fprintf(stderr, "\n\nhtop " VERSION " aborting. Unsupported platform.\n");
33 @@ -14,7 +14,9 @@ in the source distribution for its full
37 +#ifdef HAVE_EXECINFO_H
45 @@ -25,6 +25,7 @@ AC_HEADER_STDC
46 AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h curses.h],[:],[
47 missing_headers="$missing_headers $ac_header"
49 +AC_CHECK_HEADERS([execinfo.h],[:],[:])
51 # Checks for typedefs, structures, and compiler characteristics.