aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/file.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2007-06-25 20:34:20 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2007-06-25 20:34:20 +0000
commit05d00e953f4cc08273fbb5f795f4fdc307140108 (patch)
treed28aed8c53d0d48682cf9f1e921ba7b2da50edbf /libavformat/file.c
parent07c5445d5d8880aa10468d96d20152710143dbf5 (diff)
downloadffmpeg-05d00e953f4cc08273fbb5f795f4fdc307140108.tar.gz
Check for O_BINARY instead of a list of systems that need it
Originally committed as revision 9427 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/file.c')
-rw-r--r--libavformat/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/file.c b/libavformat/file.c
index 7acf446133..70c9a645cb 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -41,7 +41,7 @@ static int file_open(URLContext *h, const char *filename, int flags)
} else {
access = O_RDONLY;
}
-#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__)
+#ifdef O_BINARY
access |= O_BINARY;
#endif
fd = open(filename, access, 0666);
@@ -96,7 +96,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags)
} else {
fd = 0;
}
-#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__)
+#ifdef O_BINARY
setmode(fd, O_BINARY);
#endif
h->priv_data = (void *)(size_t)fd;