Fix Linux build.

This commit is contained in:
XMRig 2019-03-26 22:05:56 +07:00
parent ced25c3fa0
commit 17e9e036f1
4 changed files with 4 additions and 2 deletions

View file

@ -74,6 +74,6 @@ if (NOT WIN32)
CHECK_INCLUDE_FILE (syslog.h HAVE_SYSLOG_H)
if (HAVE_SYSLOG_H)
add_definitions(/DHAVE_SYSLOG_H)
set(SOURCES_SYSLOG src/base/log/backends/SysLog.h src/base/log/backends/SysLog.cpp)
set(SOURCES_SYSLOG src/base/io/log/backends/SysLog.h src/base/io/log/backends/SysLog.cpp)
endif()
endif()

View file

@ -30,6 +30,7 @@
#endif
#include <string.h>
#include <string>
#include <time.h>
#include <uv.h>

View file

@ -24,6 +24,7 @@
*/
#include <string.h>
#include <uv.h>

View file

@ -49,5 +49,5 @@ void xmrig::SysLog::print(int level, const char *line, size_t offset, size_t, bo
return;
}
syslog(level == -1 ? LOG_INFO : level, line + offset);
syslog(level == -1 ? LOG_INFO : level, "%s", line + offset);
}