projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c19e0eb
)
log: include unistd.h only when needed
author
Mans Rullgard
<mans@mansr.com>
Thu, 21 Jun 2012 15:33:36 +0000
(16:33 +0100)
committer
Mans Rullgard
<mans@mansr.com>
Thu, 21 Jun 2012 21:53:35 +0000
(22:53 +0100)
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>
libavutil/log.c
patch
|
blob
|
history
diff --git
a/libavutil/log.c
b/libavutil/log.c
index
5e84129
..
e4a9fec
100644
(file)
--- 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"