aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/file_input_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/input/file_input_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/input/file_input_plugin.c')
-rw-r--r--src/input/file_input_plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/file_input_plugin.c b/src/input/file_input_plugin.c
index a18de67b8..3646c656e 100644
--- a/src/input/file_input_plugin.c
+++ b/src/input/file_input_plugin.c
@@ -21,9 +21,9 @@
#include "input/file_input_plugin.h"
#include "input_plugin.h"
#include "fd_util.h"
+#include "open.h"
#include <sys/stat.h>
-#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
@@ -54,7 +54,7 @@ input_file_open(const char *filename, GError **error_r)
if (!g_path_is_absolute(filename))
return false;
- fd = open_cloexec(filename, O_RDONLY, 0);
+ fd = open_cloexec(filename, O_RDONLY|O_BINARY, 0);
if (fd < 0) {
if (errno != ENOENT && errno != ENOTDIR)
g_set_error(error_r, file_quark(), errno,