From: Mans Rullgard Date: Thu, 21 Jun 2012 15:33:36 +0000 (+0100) Subject: log: include unistd.h only when needed X-Git-Tag: v9_beta1~1381 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=539df61193f2452ddeb74999f0ae301d7a7318cc;p=platform%2Fupstream%2Flibav.git 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 --- 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 +#endif #include #include "avstring.h" #include "avutil.h"