diff --git a/src/App_unix.cpp b/src/App_unix.cpp index 1a2227b5..ee0fa96b 100644 --- a/src/App_unix.cpp +++ b/src/App_unix.cpp @@ -27,6 +27,7 @@ #include #include +#include "interfaces/interface.h" #include "App.h" #include "Cpu.h" diff --git a/src/Console.cpp b/src/Console.cpp index 991cfd44..3e18b94b 100644 --- a/src/Console.cpp +++ b/src/Console.cpp @@ -25,6 +25,8 @@ #include "Console.h" #include "interfaces/IConsoleListener.h" +#include "interfaces/interface.h" + Console::Console(IConsoleListener* listener) : m_listener(listener) diff --git a/src/Cpu.cpp b/src/Cpu.cpp index 24a68e52..a5243fe9 100644 --- a/src/Cpu.cpp +++ b/src/Cpu.cpp @@ -84,8 +84,8 @@ int Cpu::optimalThreadsCount(int algo, bool doubleHash, int maxCpuUsage) void Cpu::initCommon() { - struct cpu_raw_data_t raw = { 0 }; - struct cpu_id_t data = { 0 }; + struct cpu_raw_data_t raw; + struct cpu_id_t data;; cpuid_get_raw_data(&raw); cpu_identify(&raw, &data); diff --git a/src/Options.cpp b/src/Options.cpp index 03a63342..7a84117c 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -37,6 +37,7 @@ #include #endif +#include "interfaces/interface.h" #include "Cpu.h" #include "donate.h" diff --git a/src/Platform_unix.cpp b/src/Platform_unix.cpp index da20c79d..44b9f0cb 100644 --- a/src/Platform_unix.cpp +++ b/src/Platform_unix.cpp @@ -28,7 +28,9 @@ #include #include #include +#include +#include "log/Log.h" #include "Platform.h" #include "version.h" @@ -126,9 +128,12 @@ void Platform::setThreadPriority(int priority) if(sched_setscheduler(0, SCHED_IDLE, ¶m) != 0) { - sched_setscheduler(0, SCHED_BATCH, ¶m); + const int err = sched_setscheduler(0, SCHED_BATCH, ¶m); + LOG_WARN("SCHED_BATCH priority: " << err << "."); } } +#else + LOG_INFO("NONE priority."); # endif } diff --git a/src/api/Api.h b/src/api/Api.h index 5335c224..660c7a25 100644 --- a/src/api/Api.h +++ b/src/api/Api.h @@ -28,6 +28,7 @@ #include #include +#include "interfaces/interface.h" class ApiState; class Hashrate; diff --git a/src/interfaces/IConsoleListener.h b/src/interfaces/IConsoleListener.h index af624ace..51aaf50c 100644 --- a/src/interfaces/IConsoleListener.h +++ b/src/interfaces/IConsoleListener.h @@ -24,7 +24,6 @@ #ifndef __ICONSOLELISTENER_H__ #define __ICONSOLELISTENER_H__ -#include "interfaces/interface.h" class IConsoleListener { diff --git a/src/net/Url.cpp b/src/net/Url.cpp index 4307df1f..2560c854 100644 --- a/src/net/Url.cpp +++ b/src/net/Url.cpp @@ -26,6 +26,7 @@ #include #include "net/Url.h" +#include "interfaces/interface.h" #ifdef _MSC_VER #define strncasecmp(x,y,z) _strnicmp(x,y,z) diff --git a/src/workers/Handle.cpp b/src/workers/Handle.cpp index b6111fd3..639e0a22 100644 --- a/src/workers/Handle.cpp +++ b/src/workers/Handle.cpp @@ -23,6 +23,7 @@ #include "workers/Handle.h" +#include "interfaces/interface.h" Handle::Handle(int threadId, int threads, int64_t affinity, int priority) : diff --git a/src/workers/Handle.h b/src/workers/Handle.h index 5479b26d..f95dfdda 100644 --- a/src/workers/Handle.h +++ b/src/workers/Handle.h @@ -28,7 +28,6 @@ #include #include -#include "interfaces/interface.h" class IWorker; diff --git a/src/workers/Workers.h b/src/workers/Workers.h index 333558ed..e2ee5d65 100644 --- a/src/workers/Workers.h +++ b/src/workers/Workers.h @@ -31,7 +31,6 @@ #include "net/Job.h" #include "net/JobResult.h" -#include "interfaces/interface.h" class Handle; class Hashrate;