aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/fifo_output_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-20 06:59:25 +0200
committerMax Kellermann <max@duempel.org>2010-05-20 09:13:39 +0200
commitc727e8698020f69516cb62e001ac6f8254025fe1 (patch)
tree925ec857d42dc44b743a31de36691b64e59914b0 /src/output/fifo_output_plugin.c
parent57b4013306c18a1c510d00845a9915bea0bcf525 (diff)
downloadmpd-c727e8698020f69516cb62e001ac6f8254025fe1.tar.gz
mpd-c727e8698020f69516cb62e001ac6f8254025fe1.tar.xz
mpd-c727e8698020f69516cb62e001ac6f8254025fe1.zip
input/file, output/{fifo,recorder}: add O_BINARY to open() flags
Windows compatibility.
Diffstat (limited to 'src/output/fifo_output_plugin.c')
-rw-r--r--src/output/fifo_output_plugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/output/fifo_output_plugin.c b/src/output/fifo_output_plugin.c
index a92c689f9..f4217ec4d 100644
--- a/src/output/fifo_output_plugin.c
+++ b/src/output/fifo_output_plugin.c
@@ -22,12 +22,12 @@
#include "utils.h"
#include "timer.h"
#include "fd_util.h"
+#include "open.h"
#include <glib.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
@@ -154,7 +154,7 @@ fifo_open(struct fifo_data *fd, GError **error)
if (!fifo_check(fd, error))
return false;
- fd->input = open_cloexec(fd->path, O_RDONLY|O_NONBLOCK, 0);
+ fd->input = open_cloexec(fd->path, O_RDONLY|O_NONBLOCK|O_BINARY, 0);
if (fd->input < 0) {
g_set_error(error, fifo_output_quark(), errno,
"Could not open FIFO \"%s\" for reading: %s",
@@ -163,7 +163,7 @@ fifo_open(struct fifo_data *fd, GError **error)
return false;
}
- fd->output = open_cloexec(fd->path, O_WRONLY|O_NONBLOCK, 0);
+ fd->output = open_cloexec(fd->path, O_WRONLY|O_NONBLOCK|O_BINARY, 0);
if (fd->output < 0) {
g_set_error(error, fifo_output_quark(), errno,
"Could not open FIFO \"%s\" for writing: %s",