summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2006-02-14 23:49:38 +0000
committerJan Kneschke <jan@kneschke.de>2006-02-14 23:49:38 +0000
commitcdc4c4cc8fb47cb17a39f0c2d99360fd7bf1d5c4 (patch)
tree97c753657e145743df1eb66a33bdf6dfcc6bd34d
parent8d5968c4b75e1b4832145bcce6e0627c409034de (diff)
downloadlighttpd-git-cdc4c4cc8fb47cb17a39f0c2d99360fd7bf1d5c4.tar.gz
fallback to madvise(), it works at least
git-svn-id: svn+ssh://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@996 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--src/network_writev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network_writev.c b/src/network_writev.c
index 578048e8..96a2a4a9 100644
--- a/src/network_writev.c
+++ b/src/network_writev.c
@@ -255,14 +255,14 @@ int network_write_chunkqueue_writev(server *srv, connection *con, int fd, chunkq
#ifdef LOCAL_BUFFERING
buffer_copy_string_len(c->mem, c->file.mmap.start, c->file.mmap.length);
#else
-#ifdef HAVE_POSIX_MADVISE
+#ifdef HAVE_MADVISE
/* don't advise files < 64Kb */
if (c->file.mmap.length > (64 KByte)) {
/* darwin 7 is returning EINVAL all the time and I don't know how to
* detect this at runtime.i
*
* ignore the return value for now */
- posix_madvise(c->file.mmap.start, c->file.mmap.length, POSIX_MADV_WILLNEED);
+ madvise(c->file.mmap.start, c->file.mmap.length, MADV_WILLNEED);
}
#endif
#endif