Add support for Haiku (#3342)

* Update cppcheckexecutor.cpp

* Update threadexecutor.cpp
This commit is contained in:
Coldfirex 2021-07-20 04:04:20 -05:00 committed by GitHub
parent fb5ab5e439
commit 3312a9f934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@
# include <ucontext.h> # include <ucontext.h>
# undef _XOPEN_SOURCE # undef _XOPEN_SOURCE
#elif !defined(__OpenBSD__) #elif !defined(__OpenBSD__) && !defined(__HAIKU__)
# include <ucontext.h> # include <ucontext.h>
#endif #endif
#ifdef __linux__ #ifdef __linux__

View File

@ -149,7 +149,7 @@ int ThreadExecutor::handleRead(int rpipe, unsigned int &result)
bool ThreadExecutor::checkLoadAverage(size_t nchildren) bool ThreadExecutor::checkLoadAverage(size_t nchildren)
{ {
#if defined(__CYGWIN__) || defined(__QNX__) // getloadavg() is unsupported on Cygwin, Qnx. #if defined(__CYGWIN__) || defined(__QNX__) || defined(__HAIKU__) // getloadavg() is unsupported on Cygwin, Qnx, Haiku.
return true; return true;
#else #else
if (!nchildren || !mSettings.loadAverage) { if (!nchildren || !mSettings.loadAverage) {