aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-08-28 22:54:43 +0300
committerMartin Storsjö <martin@martin.st>2012-08-29 00:24:07 +0300
commit212ec5faf9a75380594c9b49dc689b7e8be0e2cc (patch)
treeecf5e6f1e75e94f01b9ff6a1792bfbf8d39571e5
parent3ad9eac5a0be9698fe908f2bafe8b76a0d6528ce (diff)
downloadffmpeg-212ec5faf9a75380594c9b49dc689b7e8be0e2cc.tar.gz
tools: Include io.h for open/read/write/close if unistd.h doesn't exist
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--tools/cws2fws.c6
-rw-r--r--tools/pktdumper.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/cws2fws.c b/tools/cws2fws.c
index 68f7953b56..74588c10a6 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 d23cd9674f..9243c93373 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"