aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-06-21 16:54:02 +0100
committerMans Rullgard <mans@mansr.com>2012-06-21 22:54:31 +0100
commitd11baad055857ef01e79a0499efbdcbad5c7e657 (patch)
tree4631376298b2714ec00befed4845a0a4e994e42d
parent542920b7f6d977dc29689b669b92a5cd82597785 (diff)
downloadffmpeg-d11baad055857ef01e79a0499efbdcbad5c7e657.tar.gz
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@mansr.com>
-rw-r--r--libavutil/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/file.c b/libavutil/file.c
index 77aaca0fc0..e1d0831994 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