From 7f5d7cf7ddf3e204f36db1501ac443ed8319d337 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sat, 31 Mar 2018 16:52:58 +0700 Subject: [PATCH] Fix Linux build. --- src/App_unix.cpp | 10 ++++++---- src/Mem_unix.cpp | 1 - src/core/Controller.cpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/App_unix.cpp b/src/App_unix.cpp index 674a53e6d..fdb2b124a 100644 --- a/src/App_unix.cpp +++ b/src/App_unix.cpp @@ -29,20 +29,22 @@ #include "App.h" +#include "core/Config.h" +#include "core/Controller.h" #include "Cpu.h" #include "log/Log.h" -#include "Options.h" void App::background() { signal(SIGPIPE, SIG_IGN); - if (m_options->affinity() != -1L) { - Cpu::setAffinity(-1, m_options->affinity()); + const int64_t affinity = m_controller->config()->affinity(); + if (affinity != -1L) { + Cpu::setAffinity(-1, affinity); } - if (!m_options->background()) { + if (!m_controller->config()->isBackground()) { return; } diff --git a/src/Mem_unix.cpp b/src/Mem_unix.cpp index 3e6995444..3b69f2679 100644 --- a/src/Mem_unix.cpp +++ b/src/Mem_unix.cpp @@ -37,7 +37,6 @@ #include "crypto/CryptoNight.h" #include "log/Log.h" #include "Mem.h" -#include "Options.h" #include "xmrig.h" diff --git a/src/core/Controller.cpp b/src/core/Controller.cpp index b8c93c82b..35fab2a29 100644 --- a/src/core/Controller.cpp +++ b/src/core/Controller.cpp @@ -109,7 +109,7 @@ int xmrig::Controller::init(int argc, char **argv) } # ifdef HAVE_SYSLOG_H - if (config()->syslog()) { + if (config()->isSyslog()) { Log::add(new SysLog()); } # endif