file: Only include unistd.h if it exists
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ö <martin@martin.st> Conflicts: configure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
a4d71eb5c3
commit
f3be359707
@@ -22,10 +22,12 @@
|
||||
#include "libavutil/avstring.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"
|
||||
|
Reference in New Issue
Block a user