diff options
Diffstat (limited to 'src/strings.c')
| -rw-r--r-- | src/strings.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/strings.c b/src/strings.c index 22cbfaca..46b23560 100644 --- a/src/strings.c +++ b/src/strings.c @@ -574,9 +574,11 @@ read_block (int fd, const char *fname, off_t fdlen, off_t from, off_t to) elfmap_off = from & ~(ps - 1); elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size); +#if HAVE_DECL_POSIX_FADVISE if (unlikely (elfmap == MAP_FAILED)) /* Let the kernel know we are going to read everything in sequence. */ (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL); +#endif } if (unlikely (elfmap == MAP_FAILED)) |
