Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
4a202532
Commit
4a202532
authored
Oct 10, 2008
by
hartman
Browse files
mmap: backport fcntl defined fix from [
47a7e913
]
parent
47a7e913
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/access/mmap.c
View file @
4a202532
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment