Module: libav
Branch: master
Commit: d11baad055857ef01e79a0499efbdcbad5c7e657

Author:    Mans Rullgard <[email protected]>
Committer: Mans Rullgard <[email protected]>
Date:      Thu Jun 21 16:54:02 2012 +0100

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 <[email protected]>

---

 libavutil/file.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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

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

Reply via email to