aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMartin Storsjö2012-08-28 22:54:43 +0300
committerMartin Storsjö2012-08-29 00:24:07 +0300
commit212ec5faf9a75380594c9b49dc689b7e8be0e2cc (patch)
treeecf5e6f1e75e94f01b9ff6a1792bfbf8d39571e5 /tools
parent3ad9eac5a0be9698fe908f2bafe8b76a0d6528ce (diff)
tools: Include io.h for open/read/write/close if unistd.h doesn't exist
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tools')
-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"