Browse Source

if posix_fadvise is not implemented, ignore the error

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@991 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.11
Jan Kneschke 17 years ago
parent
commit
a5b69917d1
  1. 6
      src/network_linux_sendfile.c

6
src/network_linux_sendfile.c

@ -159,8 +159,10 @@ int network_write_chunkqueue_linuxsendfile(server *srv, connection *con, int fd,
#ifdef HAVE_POSIX_FADVISE
/* tell the kernel that we want to stream the file */
if (-1 == posix_fadvise(c->file.fd, 0, 0, POSIX_FADV_SEQUENTIAL)) {
log_error_write(srv, __FILE__, __LINE__, "ssd",
"posix_fadvise failed:", strerror(errno), c->file.fd);
if (ENOSYS != errno) {
log_error_write(srv, __FILE__, __LINE__, "ssd",
"posix_fadvise failed:", strerror(errno), c->file.fd);
}
}
#endif
}

Loading…
Cancel
Save