Check for POSIX_FADV_SEQUENTIAL before using it

personal/stbuehler/wip
Stefan Bühler 15 years ago
parent 3dceeb5916
commit 6c573e5e00

@ -58,7 +58,7 @@ handler_t chunkfile_open(vrequest *vr, chunkfile *cf) {
#ifdef FD_CLOEXEC
fcntl(cf->fd, F_SETFD, FD_CLOEXEC);
#endif
#ifdef HAVE_POSIX_FADVISE
#if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_SEQUENTIAL)
/* tell the kernel that we want to stream the file */
if (-1 == posix_fadvise(cf->fd, 0, 0, POSIX_FADV_SEQUENTIAL)) {
if (ENOSYS != errno) {

Loading…
Cancel
Save