cache: Only include unistd.h if it exists
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Fri, 7 Sep 2012 17:20:42 +0000 (13:20 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 7 Sep 2012 17:29:58 +0000 (19:29 +0200)
This follows suite from f3be3597079be7cd7adbb8392c32e408cadd3da2.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/cache.c

index 900554a..2cfc396 100644 (file)
 #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"