[FFmpeg-devel] [PATCH] cache: Only include unistd.h if it exists

Derek Buitenhuis derek.buitenhuis at gmail.com
Fri Sep 7 19:20:42 CEST 2012


This follows suite from f3be3597079be7cd7adbb8392c32e408cadd3da2.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
 libavformat/cache.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/cache.c b/libavformat/cache.c
index 900554a..2cfc396 100644
--- a/libavformat/cache.c
+++ b/libavformat/cache.c
@@ -33,10 +33,12 @@
 #include "libavutil/file.h"
 #include "avformat.h"
 #include <fcntl.h>
-#if HAVE_SETMODE
+#if HAVE_IO_H
 #include <io.h>
 #endif
+#if HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <sys/stat.h>
 #include <stdlib.h>
 #include "os_support.h"
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list