Fix compilation with GCC 7.1.0

This commit is contained in:
Maxime Gauduin 2017-05-25 13:36:11 +02:00 committed by GitHub
parent 25210d5f2a
commit f3453500d4

View File

@ -235,7 +235,7 @@ RFILE *filestream_open(const char *path, unsigned mode, ssize_t len)
#endif
{
/* FIXME: HAVE_BUFFERED_IO is always 1, but if it is ever changed, open() needs to be changed to _wopen() for WIndows. */
stream->fd = open(path, flags);
stream->fd = open(path, flags, mode_int);
if (stream->fd == -1)
goto error;
#ifdef HAVE_MMAP