input/file, output/{fifo,recorder}: add O_BINARY to open() flags

Windows compatibility.
This commit is contained in:
Max Kellermann
2010-05-20 06:59:25 +02:00
parent 57b4013306
commit c727e86980
4 changed files with 49 additions and 7 deletions

View File

@@ -22,11 +22,11 @@
#include "encoder_plugin.h"
#include "encoder_list.h"
#include "fd_util.h"
#include "open.h"
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
@@ -158,7 +158,8 @@ recorder_output_open(void *data, struct audio_format *audio_format,
/* create the output file */
recorder->fd = open_cloexec(recorder->path, O_CREAT|O_WRONLY|O_TRUNC,
recorder->fd = open_cloexec(recorder->path,
O_CREAT|O_WRONLY|O_TRUNC|O_BINARY,
0666);
if (recorder->fd < 0) {
g_set_error(error_r, recorder_output_quark(), 0,