mu: use g_strerror instead of strerror
Some #includes were missing for the latter (but only noticeable on some systems - e.g., build breaks on Cygwin). So let's replace with something that works equally everywhere. Fixes: #2060
This commit is contained in:
@ -48,7 +48,7 @@ maybe_open_logfile ()
|
||||
MuStream.open (MuLogPath, std::ios::out | std::ios::app );
|
||||
if (!MuStream.is_open()) {
|
||||
std::cerr << "opening " << MuLogPath << " failed:"
|
||||
<< strerror(errno) << std::endl;
|
||||
<< g_strerror(errno) << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ maybe_rotate_logfile ()
|
||||
if (g_rename(MuLogPath.c_str(), old.c_str()) != 0)
|
||||
std::cerr << "failed to rename "
|
||||
<< MuLogPath << " -> " << old.c_str()
|
||||
<< ": " << ::strerror(errno) << std::endl;
|
||||
<< ": " << g_strerror(errno) << std::endl;
|
||||
|
||||
return maybe_open_logfile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user