changeset 4200:898c3d1d9e4e libavformat

Use setmode() if it exists in <io.h>, and not based on O_BINARY.
author ramiro
date Sun, 11 Jan 2009 22:05:43 +0000
parents 0702e0927a4f
children 7d2f3f1b68d8
files file.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/file.c	Sun Jan 11 21:08:52 2009 +0000
+++ b/file.c	Sun Jan 11 22:05:43 2009 +0000
@@ -22,6 +22,9 @@
 #include "libavutil/avstring.h"
 #include "avformat.h"
 #include <fcntl.h>
+#ifdef HAVE_SETMODE
+#include <io.h>
+#endif
 #include <unistd.h>
 #include <sys/time.h>
 #include <stdlib.h>
@@ -104,7 +107,7 @@
             fd = 0;
         }
     }
-#ifdef O_BINARY
+#ifdef HAVE_SETMODE
     setmode(fd, O_BINARY);
 #endif
     h->priv_data = (void *)(size_t)fd;