diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index 8024fa362..7ac40f2ce 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -20,7 +20,7 @@ #include "cppcheck.h" #include #include -#if defined(__GNUC__) && !defined(__MINGW32__) +#if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) #include #include #include @@ -41,10 +41,10 @@ ThreadExecutor::~ThreadExecutor() } /////////////////////////////////////////////////////////////////////////////// -////// This code is for __GNUC__ only ///////////////////////////////////////// +////// This code is for __GNUC__ and __sun only /////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#if defined(__GNUC__) && !defined(__MINGW32__) +#if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) bool ThreadExecutor::handleRead(unsigned int &result) { diff --git a/cli/threadexecutor.h b/cli/threadexecutor.h index 4679cf979..0a1ea8201 100644 --- a/cli/threadexecutor.h +++ b/cli/threadexecutor.h @@ -45,7 +45,7 @@ private: ErrorLogger &_errorLogger; unsigned int _fileCount; -#if defined(__GNUC__) && !defined(__MINGW32__) +#if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) private: bool handleRead(unsigned int &result); void writeToPipe(char type, const std::string &data);