From 3b1ab197be185b61247ef2472f15eeac3e765252 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 25 Jun 2012 00:42:27 +0300 Subject: file: Only include unistd.h if it exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is included for the open/read/write/close functions. On MSVC, where this header does not exist, the same functions are provided by io.h, which is already included. On windows, these functions are provided by io.h. Make sure io.h is included if it exists, regardless of the setmode function. Signed-off-by: Martin Storsjö --- libavformat/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavformat/file.c') diff --git a/libavformat/file.c b/libavformat/file.c index cca9ec1a06..0e3577d070 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -22,10 +22,12 @@ #include "libavutil/avstring.h" #include "avformat.h" #include -#if HAVE_SETMODE +#if HAVE_IO_H #include #endif +#if HAVE_UNISTD_H #include +#endif #include #include #include "os_support.h" -- cgit v1.2.3