Index: stream/stream_live555.c =================================================================== --- stream/stream_live555.c (revision 30819) +++ stream/stream_live555.c (working copy) @@ -79,11 +79,7 @@ if(strncmp("sdp://",filename,6) == 0) { filename += 6; -#if defined(__CYGWIN__) || defined(__MINGW32__) f = open(filename,O_RDONLY|O_BINARY); -#else - f = open(filename,O_RDONLY); -#endif if(f < 0) { mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_FileNotFound,filename); return STREAM_ERROR; Index: stream/stream_file.c =================================================================== --- stream/stream_file.c (revision 30819) +++ stream/stream_file.c (working copy) @@ -136,9 +136,7 @@ filename++; #endif -#if defined(__CYGWIN__)|| defined(__MINGW32__) || defined(__OS2__) m |= O_BINARY; -#endif if(!strcmp(filename,"-")){ if(mode == STREAM_READ) { Index: stream/stream.h =================================================================== --- stream/stream.h (revision 30819) +++ stream/stream.h (working copy) @@ -25,7 +25,12 @@ #include #include #include +#include +#ifndef O_BINARY +#define O_BINARY 0 +#endif + #define STREAMTYPE_DUMMY -1 // for placeholders, when the actual reading is handled in the demuxer #define STREAMTYPE_FILE 0 // read from seekable file #define STREAMTYPE_VCD 1 // raw mode-2 CDROM reading, 2324 bytes/sector Index: stream/stream_cddb.c =================================================================== --- stream/stream_cddb.c (revision 30819) +++ stream/stream_cddb.c (working copy) @@ -76,10 +76,6 @@ #include "network.h" #include "libavutil/common.h" -#ifndef O_BINARY -#define O_BINARY 0 -#endif - #define DEFAULT_FREEDB_SERVER "freedb.freedb.org" #define DEFAULT_CACHE_DIR "/.cddb/"