summaryrefslogtreecommitdiff
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-06-21 16:33:36 +0100
committerMans Rullgard <mans@mansr.com>2012-06-21 22:53:35 +0100
commit539df61193f2452ddeb74999f0ae301d7a7318cc (patch)
tree2116cd937e6229a379e817b17d1f1e5918f0e856 /libavutil/log.c
parentc19e0ebe532360aee043b5fb275257dc008968c3 (diff)
log: include unistd.h only when needed
The only symbol this file uses from unistd.h is isatty(). By including the header only when this function is used, the file can be built on systems without unistd.h (which presumably also lack isatty). Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil/log.c')
-rw-r--r--libavutil/log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 5e841296bb..e4a9fec552 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -24,7 +24,11 @@
* logging functions
*/
+#include "config.h"
+
+#if HAVE_ISATTY
#include <unistd.h>
+#endif
#include <stdlib.h>
#include "avstring.h"
#include "avutil.h"