diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp index 7220a0f04..ac6d6a37f 100644 --- a/cli/cppcheckexecutor.cpp +++ b/cli/cppcheckexecutor.cpp @@ -32,7 +32,7 @@ #include #include -#if !defined(NO_UNIX_SIGNAL_HANDLING) && defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__OS2__) +#if !defined(NO_UNIX_SIGNAL_HANDLING) && defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__OS2__) && !defined(__SVR4) #define USE_UNIX_SIGNAL_HANDLING #include #include @@ -237,7 +237,7 @@ static const char *signal_name(int signo) */ static void print_stacktrace(FILE* f, bool demangling) { -#if defined(__GNUC__) +#if defined(USE_UNIX_SIGNAL_SUPPORT) void *array[32]= {0}; // the less resources the better... const int depth = backtrace(array, (int)GetArrayLength(array)); char **symbolstrings = backtrace_symbols(array, depth); diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index 32cdc8ea1..aed99fe8f 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -20,6 +20,9 @@ #include "cppcheck.h" #include "cppcheckexecutor.h" #include +#ifdef __SVR4 // Solaris +#include +#endif #ifdef THREADING_MODEL_FORK #include #include