2
0
Fork 0

Check for POSIX_FADV_SEQUENTIAL before using it

personal/stbuehler/wip
Stefan Bühler 2008-11-16 22:06:28 +01:00
parent 3dceeb5916
commit 6c573e5e00
1 changed files with 1 additions and 1 deletions

View File

@ -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) {