[FFmpeg-cvslog] avutil: Include io.h with a separate condition from MapViewOfFile

Martin Storsjö git at videolan.org
Fri Nov 30 15:06:27 CET 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Nov 29 17:02:42 2012 +0200| [15816c8e8bd5ab2f027824ea5122d7901633634a] | committer: Martin Storsjö

avutil: Include io.h with a separate condition from MapViewOfFile

The existence of MapViewOfFile isn't linked to the existence of
io.h.

Not all versions of windows have MapViewOfFile (in particular,
Windows Phone 8 and the "metro" windows 8 API subset don't),
while they still have io.h (and need it for open/read/close).

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15816c8e8bd5ab2f027824ea5122d7901633634a
---

 libavutil/file.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavutil/file.c b/libavutil/file.c
index 41bd0dd..ce02487 100644
--- a/libavutil/file.c
+++ b/libavutil/file.c
@@ -25,10 +25,12 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#if HAVE_IO_H
+#include <io.h>
+#endif
 #if HAVE_MMAP
 #include <sys/mman.h>
 #elif HAVE_MAPVIEWOFFILE
-#include <io.h>
 #include <windows.h>
 #endif
 



More information about the ffmpeg-cvslog mailing list