diff --git a/src/App_unix.cpp b/src/App_unix.cpp index b1efce831..5149513c3 100644 --- a/src/App_unix.cpp +++ b/src/App_unix.cpp @@ -31,7 +31,7 @@ #include "App.h" #include "base/io/log/Log.h" -#include "core/Config.h" +#include "core/config/Config.h" #include "core/Controller.h" diff --git a/src/api/Api.cpp b/src/api/Api.cpp index f6b5ba013..fc82ac9c4 100644 --- a/src/api/Api.cpp +++ b/src/api/Api.cpp @@ -26,6 +26,11 @@ #include +#ifndef _WIN32 +# include +#endif + + #include "3rdparty/http-parser/http_parser.h" #include "api/Api.h" #include "api/interfaces/IApiListener.h" diff --git a/src/api/v1/ApiRouter.h b/src/api/v1/ApiRouter.h index 02be91e2b..9bb992447 100644 --- a/src/api/v1/ApiRouter.h +++ b/src/api/v1/ApiRouter.h @@ -26,7 +26,6 @@ #define XMRIG_APIROUTER_H -#include "net/NetworkState.h" #include "api/interfaces/IApiListener.h" #include "rapidjson/fwd.h" @@ -43,7 +42,7 @@ class Controller; class ApiRouter : public xmrig::IApiListener { public: - ApiRouter(xmrig::Controller *controller); + ApiRouter(Controller *controller); ~ApiRouter() override; protected: diff --git a/src/base/net/http/HttpResponse.cpp b/src/base/net/http/HttpResponse.cpp index 77431a624..bfb4e1bab 100644 --- a/src/base/net/http/HttpResponse.cpp +++ b/src/base/net/http/HttpResponse.cpp @@ -24,8 +24,9 @@ */ -#include #include +#include +#include #include "3rdparty/http-parser/http_parser.h" diff --git a/src/core/Controller.cpp b/src/core/Controller.cpp index fbe4a427e..32507e907 100644 --- a/src/core/Controller.cpp +++ b/src/core/Controller.cpp @@ -195,6 +195,8 @@ void xmrig::Controller::start() # ifdef XMRIG_FEATURE_API api()->start(); # endif + + save(); } diff --git a/src/core/Controller.h b/src/core/Controller.h index 82a90b84e..c1ca3da3b 100644 --- a/src/core/Controller.h +++ b/src/core/Controller.h @@ -29,9 +29,6 @@ #include "base/kernel/interfaces/IConfigListener.h" -class StatsData; - - namespace xmrig { diff --git a/src/workers/Workers.cpp b/src/workers/Workers.cpp index 1e22f4039..539901354 100644 --- a/src/workers/Workers.cpp +++ b/src/workers/Workers.cpp @@ -207,8 +207,6 @@ void Workers::start(xmrig::Controller *controller) m_workers.push_back(handle); handle->start(Workers::onReady); } - - controller->save(); }