Commit 4a202532 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

mmap: backport fcntl defined fix from [47a7e913]

parent 47a7e913
......@@ -122,12 +122,16 @@ static int Open (vlc_object_t *p_this)
goto error;
}
# if defined(HAVE_FCNTL_H) && defined(F_FDAHEAD) && defined(F_NOCACHE)
#if defined(HAVE_FCNTL_H)
/* We'd rather use any available memory for reading ahead
* than for caching what we've already mmap'ed */
# if defined(F_RDAHEAD)
fcntl (fd, F_RDAHEAD, 1);
# endif
# if defined(F_NOCACHE)
fcntl (fd, F_NOCACHE, 1);
# endif
#endif
/* Autodetect mmap() support */
if (st.st_size > 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment