diff options
author | Max Kellermann <max@duempel.org> | 2015-03-05 08:02:07 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-03-05 08:58:04 +0100 |
commit | 39c96694454822ade1d3a686f6e29bd52fa5a4d1 (patch) | |
tree | c4a9c64a84c09caa9d0d8057a5a71be53536dcb7 /src/unix | |
parent | 44565e22a054b9bdeb48e79e1d23f914b7efaa0f (diff) | |
download | mpd-39c96694454822ade1d3a686f6e29bd52fa5a4d1.tar.gz mpd-39c96694454822ade1d3a686f6e29bd52fa5a4d1.tar.xz mpd-39c96694454822ade1d3a686f6e29bd52fa5a4d1.zip |
fs/Traits: add macro PATH_LITERAL()
Diffstat (limited to '')
-rw-r--r-- | src/unix/Daemon.cxx | 2 | ||||
-rw-r--r-- | src/unix/PidFile.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/unix/Daemon.cxx b/src/unix/Daemon.cxx index 3787244d7..c3638cc80 100644 --- a/src/unix/Daemon.cxx +++ b/src/unix/Daemon.cxx @@ -71,7 +71,7 @@ daemonize_kill(void) if (pidfile.IsNull()) FatalError("no pid_file specified in the config file"); - fp = FOpen(pidfile, "r"); + fp = FOpen(pidfile, PATH_LITERAL("r")); if (fp == nullptr) { const std::string utf8 = pidfile.ToUTF8(); FormatFatalSystemError("Unable to open pid file \"%s\"", diff --git a/src/unix/PidFile.hxx b/src/unix/PidFile.hxx index 76d0f13cc..3c3d5ca21 100644 --- a/src/unix/PidFile.hxx +++ b/src/unix/PidFile.hxx @@ -37,7 +37,7 @@ public: if (path.IsNull()) return; - file = FOpen(path, "w"); + file = FOpen(path, FOpenMode::WriteText); if (file == nullptr) { const std::string utf8 = path.ToUTF8(); FormatFatalSystemError("Failed to create pid file \"%s\"", |