mirror of
https://github.com/xmrig/xmrig.git
synced 2024-10-30 13:07:46 +00:00
fix build error on gcc 9.3.0
FileLogWriter.h:34:41: error: array used as initializer
This commit is contained in:
parent
277352d072
commit
866e97efcf
2 changed files with 3 additions and 3 deletions
|
@ -91,7 +91,7 @@ bool xmrig::FileLogWriter::writeLine(const char *data, size_t size)
|
||||||
{
|
{
|
||||||
const uv_buf_t buf[2] = {
|
const uv_buf_t buf[2] = {
|
||||||
uv_buf_init(new char[size], size),
|
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);
|
memcpy(buf[0].base, data, size);
|
||||||
|
|
|
@ -42,9 +42,9 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
# ifdef XMRIG_OS_WIN
|
# ifdef XMRIG_OS_WIN
|
||||||
char m_endl[3] = "\r\n";
|
const char m_endl[3] = {'\r', '\n', 0};
|
||||||
# else
|
# else
|
||||||
char m_endl[2] = "\n";
|
const char m_endl[2] = {'\n', 0};
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
int m_file = -1;
|
int m_file = -1;
|
||||||
|
|
Loading…
Reference in a new issue