From b507ebd1792da5e44088ddcab315b41cc500695b Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Sun, 11 Jan 2009 22:05:43 +0000 Subject: Use setmode() if it exists in , and not based on O_BINARY. Originally committed as revision 16553 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavformat/file.c') diff --git a/libavformat/file.c b/libavformat/file.c index e50168d89e..827541d1ae 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -22,6 +22,9 @@ #include "libavutil/avstring.h" #include "avformat.h" #include +#ifdef HAVE_SETMODE +#include +#endif #include #include #include @@ -104,7 +107,7 @@ static int pipe_open(URLContext *h, const char *filename, int flags) fd = 0; } } -#ifdef O_BINARY +#ifdef HAVE_SETMODE setmode(fd, O_BINARY); #endif h->priv_data = (void *)(size_t)fd; -- cgit v1.2.3