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-c4023f1b3aa9svn/tags/lighttpd-1.4.11
parent
d7339a70b9
commit
a5b69917d1
|
@ -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…
Reference in New Issue