[FFmpeg-cvslog] lavu/file: include unistd.h only when available
Mans Rullgard
git at videolan.org
Fri Jun 22 22:36:34 CEST 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Thu Jun 21 16:54:02 2012 +0100| [d11baad055857ef01e79a0499efbdcbad5c7e657] | committer: Mans Rullgard
lavu/file: include unistd.h only when available
The unistd.h header is only needed for the close() declaration.
If this header is not available, the close() declaration may be
provided by another header, e.g. io.h.
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d11baad055857ef01e79a0499efbdcbad5c7e657
---
libavutil/file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavutil/file.c b/libavutil/file.c
index 77aaca0..e1d0831 100644
--- a/libavutil/file.c
+++ b/libavutil/file.c
@@ -20,7 +20,9 @@
#include "log.h"
#include <fcntl.h>
#include <sys/stat.h>
+#if HAVE_UNISTD_H
#include <unistd.h>
+#endif
#if HAVE_MMAP
#include <sys/mman.h>
#elif HAVE_MAPVIEWOFFILE
More information about the ffmpeg-cvslog
mailing list