OSDN Git Service

tools: Include io.h for open/read/write/close if unistd.h doesn't exist
authorMartin Storsjö <martin@martin.st>
Tue, 28 Aug 2012 19:54:43 +0000 (22:54 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 28 Aug 2012 21:24:07 +0000 (00:24 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
tools/cws2fws.c
tools/pktdumper.c

index 68f7953..74588c1 100644 (file)
@@ -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
index d23cd96..9243c93 100644 (file)
  * 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"