Fix Linux build.

This commit is contained in:
XMRig 2018-03-31 16:52:58 +07:00
parent aac7b0404a
commit 7f5d7cf7dd
3 changed files with 7 additions and 6 deletions

View file

@ -29,20 +29,22 @@
#include "App.h" #include "App.h"
#include "core/Config.h"
#include "core/Controller.h"
#include "Cpu.h" #include "Cpu.h"
#include "log/Log.h" #include "log/Log.h"
#include "Options.h"
void App::background() void App::background()
{ {
signal(SIGPIPE, SIG_IGN); signal(SIGPIPE, SIG_IGN);
if (m_options->affinity() != -1L) { const int64_t affinity = m_controller->config()->affinity();
Cpu::setAffinity(-1, m_options->affinity()); if (affinity != -1L) {
Cpu::setAffinity(-1, affinity);
} }
if (!m_options->background()) { if (!m_controller->config()->isBackground()) {
return; return;
} }

View file

@ -37,7 +37,6 @@
#include "crypto/CryptoNight.h" #include "crypto/CryptoNight.h"
#include "log/Log.h" #include "log/Log.h"
#include "Mem.h" #include "Mem.h"
#include "Options.h"
#include "xmrig.h" #include "xmrig.h"

View file

@ -109,7 +109,7 @@ int xmrig::Controller::init(int argc, char **argv)
} }
# ifdef HAVE_SYSLOG_H # ifdef HAVE_SYSLOG_H
if (config()->syslog()) { if (config()->isSyslog()) {
Log::add(new SysLog()); Log::add(new SysLog());
} }
# endif # endif