aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_linux_sendfile_chain.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-11-28 08:40:40 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-11-28 08:40:40 +0000
commit877df63f345e48bc2cb61dde86a207748051b81a (patch)
treea27f94499f27c0d079a6c7bbd3a33318e01345db /src/os/unix/ngx_linux_sendfile_chain.c
parent764543e73426fd00741483ff830cf09bfb73752f (diff)
downloadnginx-877df63f345e48bc2cb61dde86a207748051b81a.tar.gz
nginx-877df63f345e48bc2cb61dde86a207748051b81a.zip
nginx-0.0.1-2003-11-28-11:40:40 import
Diffstat (limited to 'src/os/unix/ngx_linux_sendfile_chain.c')
-rw-r--r--src/os/unix/ngx_linux_sendfile_chain.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c
index 9b311b21e..d96d93df7 100644
--- a/src/os/unix/ngx_linux_sendfile_chain.c
+++ b/src/os/unix/ngx_linux_sendfile_chain.c
@@ -4,6 +4,17 @@
#include <ngx_event.h>
+/*
+ * On Linux up to 2.4.21 sendfile() (syscall #187) works with 32-bit
+ * offsets only and the including <sys/sendfile.h> breaks building
+ * if off_t is 64 bit wide. So we use own sendfile() definition where
+ * offset paramter is int32_t. It allows to use sendfile() with
+ * the file parts below 2G.
+ *
+ * Linux 2.4.21 has a new sendfile64() syscall #239.
+ */
+
+
ngx_chain_t *ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in)
{
int rc;