From: "Ronald S. Bultje" <[email protected]>

It is included for the open/read/write/close functions. On
MSVC, where this header does not exist, the same functions
are provided by io.h, which is already included.

If the HAVE_SETMODE for including io.h feels too vague, one
could also include it within a separate #ifdef _WIN32 block.
---
 libavformat/file.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/file.c b/libavformat/file.c
index ad8ac40..ac18d0d 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -25,7 +25,9 @@
 #if HAVE_SETMODE
 #include <io.h>
 #endif
+#if HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <sys/stat.h>
 #include <stdlib.h>
 #include "os_support.h"
-- 
1.7.9.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to