summaryrefslogtreecommitdiff
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-11-30 16:56:54 +0200
committerMartin Storsjö <martin@martin.st>2012-11-30 16:56:54 +0200
commitb70abd5b614341947ce7d81c1de97877dec5f35e (patch)
tree8a3b27230096944185729027789f3caafe2006f1 /libavutil/log.c
parent15816c8e8bd5ab2f027824ea5122d7901633634a (diff)
avutil: Include io.h with a separate condition from windows console functions
Not all versions of windows have the console color functions, while io.h might be needed for isatty (which can be found in unistd.h or io.h). Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil/log.c')
-rw-r--r--libavutil/log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index d2cf88fd4b..d335944330 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -29,6 +29,9 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
+#if HAVE_IO_H
+#include <io.h>
+#endif
#include <stdlib.h>
#include "avstring.h"
#include "avutil.h"
@@ -40,7 +43,6 @@ static int flags;
#if defined(_WIN32) && !defined(__MINGW32CE__)
#include <windows.h>
-#include <io.h>
static const uint8_t color[] = { 12, 12, 12, 14, 7, 10, 11 };
static int16_t background, attr_orig;
static HANDLE con;