aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.cpp
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-06-28 10:39:04 +0900
committerstoffu <stoffu@protonmail.ch>2018-06-28 10:39:04 +0900
commit49dc78d99b35c80784e772542485431ba3ceb655 (patch)
treee7d4850bfc319bdc4aaeb3fd100bc068ea727ea0 /src/common/util.cpp
parentMerge pull request #4000 (diff)
downloadmonero-49dc78d99b35c80784e772542485431ba3ceb655.tar.xz
util: fix mistakes made in #3994
Diffstat (limited to 'src/common/util.cpp')
-rw-r--r--src/common/util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp
index eed6fd8d2..7d9d7b408 100644
--- a/src/common/util.cpp
+++ b/src/common/util.cpp
@@ -226,19 +226,19 @@ namespace tools
MERROR("Failed to open " << filename << ": " << std::error_code(GetLastError(), std::system_category()));
}
#else
- m_fd = open(filename, O_RDONLY | O_CREAT, 0666);
+ m_fd = open(filename.c_str(), O_RDONLY | O_CREAT, 0666);
if (m_fd != -1)
{
if (flock(m_fd, LOCK_EX | LOCK_NB) == -1)
{
- MERROR("Failed to lock " << filename << ": " << std::strerr(errno));
+ MERROR("Failed to lock " << filename << ": " << std::strerror(errno));
close(m_fd);
m_fd = -1;
}
}
else
{
- MERROR("Failed to open " << filename << ": " << std::strerr(errno));
+ MERROR("Failed to open " << filename << ": " << std::strerror(errno));
}
#endif
}