summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stream/stream_file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index e1f77bc2ab..e113e6788e 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -119,7 +119,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
filename++;
#endif
-#if defined(__CYGWIN__)|| defined(__MINGW32__)
+#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__)
m |= O_BINARY;
#endif
@@ -128,13 +128,13 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
// read from stdin
mp_msg(MSGT_OPEN,MSGL_INFO,MSGTR_ReadSTDIN);
f=0; // 0=stdin
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__OS2__)
setmode(fileno(stdin),O_BINARY);
#endif
} else {
mp_msg(MSGT_OPEN,MSGL_INFO,"Writing to stdout\n");
f=1;
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__OS2__)
setmode(fileno(stdout),O_BINARY);
#endif
}