[FFmpeg-cvslog] tools: Include io.h for open/read/write/close if unistd.h doesn't exist

Martin Storsjö git at videolan.org
Wed Aug 29 18:09:26 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Aug 28 22:54:43 2012 +0300| [212ec5faf9a75380594c9b49dc689b7e8be0e2cc] | committer: Martin Storsjö

tools: Include io.h for open/read/write/close if unistd.h doesn't exist

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

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

 tools/cws2fws.c   |    6 ++++++
 tools/pktdumper.c |    6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/tools/cws2fws.c b/tools/cws2fws.c
index 68f7953..74588c1 100644
--- a/tools/cws2fws.c
+++ b/tools/cws2fws.c
@@ -6,11 +6,17 @@
  * This utility converts compressed Macromedia Flash files to uncompressed ones.
  */
 
+#include "config.h"
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
+#if HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+#if HAVE_IO_H
+#include <io.h>
+#endif
 #include <zlib.h>
 
 #ifdef DEBUG
diff --git a/tools/pktdumper.c b/tools/pktdumper.c
index d23cd96..9243c93 100644
--- a/tools/pktdumper.c
+++ b/tools/pktdumper.c
@@ -18,12 +18,18 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "config.h"
 #include <limits.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#if HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+#if HAVE_IO_H
+#include <io.h>
+#endif
 
 #include "libavutil/time.h"
 #include "libavformat/avformat.h"



More information about the ffmpeg-cvslog mailing list