1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-08 00:15:04 -05:00

Merge pull request #2234 from esrrhs/dev

fix build error on gcc 4.8.5
This commit is contained in:
xmrig
2021-04-06 12:00:36 +07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -91,7 +91,7 @@ bool xmrig::FileLogWriter::writeLine(const char *data, size_t size)
{
const uv_buf_t buf[2] = {
uv_buf_init(new char[size], size),
uv_buf_init(m_endl, sizeof(m_endl) - 1)
uv_buf_init((char*)m_endl, sizeof(m_endl) - 1)
};
memcpy(buf[0].base, data, size);

View File

@@ -42,9 +42,9 @@ public:
private:
# ifdef XMRIG_OS_WIN
char m_endl[3] = "\r\n";
const char m_endl[3] = {'\r', '\n', 0};
# else
char m_endl[2] = "\n";
const char m_endl[2] = {'\n', 0};
# endif
int m_file = -1;