diff file.c @ 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 549a09cf23fe
children c3102b189cb6
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;