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 <[email protected]>
---
 libavutil/log.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavutil/log.c b/libavutil/log.c
index 5e84129..e4a9fec 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"
-- 
1.7.10.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to