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

Backport fixes from v4.

This commit is contained in:
XMRig
2019-09-20 14:54:18 +07:00
parent 1cd1f13fee
commit f6752310b4
4 changed files with 11 additions and 8 deletions

View File

@@ -28,6 +28,7 @@
#ifdef __GNUC__
# include <fcntl.h>
# include <sys/stat.h>
# include <ext/stdio_filebuf.h>
#endif
@@ -102,7 +103,7 @@ bool xmrig::Json::save(const char *fileName, const rapidjson::Document &doc)
return false;
}
# elif defined(__GNUC__)
const int fd = _wopen(toUtf16(fileName).c_str(), _O_WRONLY | _O_BINARY | _O_CREAT | _O_TRUNC);
const int fd = _wopen(toUtf16(fileName).c_str(), _O_WRONLY | _O_BINARY | _O_CREAT | _O_TRUNC, _S_IWRITE);
if (fd == -1) {
return false;
}