Index: stream/stream_file.c =================================================================== --- stream/stream_file.c (revision 29340) +++ stream/stream_file.c (working copy) @@ -119,7 +119,7 @@ filename++; #endif -#if defined(__CYGWIN__)|| defined(__MINGW32__) +#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__) m |= O_BINARY; #endif @@ -128,13 +128,13 @@ // 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 }