Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-04-24 01:32:13 +0400
committerIgor Sysoev <igor@sysoev.ru>2007-04-24 01:32:13 +0400
commit57a713c67ce8fa3273a05034173ede9028b82ac6 (patch)
tree6e0a6be7ff0082d2e97eb4c2a5c9a86b2d145983
parent29f5912635dd5364d038cff8fcdab889426b920e (diff)
fix sendfile on 64-bit Linux and limit_rate on all 64-bit platforms
for 2G+ files
-rw-r--r--src/os/unix/ngx_freebsd_sendfile_chain.c2
-rw-r--r--src/os/unix/ngx_linux_sendfile_chain.c2
-rw-r--r--src/os/unix/ngx_solaris_sendfilev_chain.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/os/unix/ngx_freebsd_sendfile_chain.c b/src/os/unix/ngx_freebsd_sendfile_chain.c
index 97f968c40..476eff332 100644
--- a/src/os/unix/ngx_freebsd_sendfile_chain.c
+++ b/src/os/unix/ngx_freebsd_sendfile_chain.c
@@ -154,7 +154,7 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
size = limit - send;
aligned = (cl->buf->file_pos + size + ngx_pagesize - 1)
- & ~(ngx_pagesize - 1);
+ & ~((off_t) ngx_pagesize - 1);
if (aligned <= cl->buf->file_last) {
size = aligned - cl->buf->file_pos;
diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c
index 1d602c886..eb15c7a5f 100644
--- a/src/os/unix/ngx_linux_sendfile_chain.c
+++ b/src/os/unix/ngx_linux_sendfile_chain.c
@@ -223,7 +223,7 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
size = limit - send;
aligned = (cl->buf->file_pos + size + ngx_pagesize - 1)
- & ~(ngx_pagesize - 1);
+ & ~((off_t) ngx_pagesize - 1);
if (aligned <= cl->buf->file_last) {
size = aligned - cl->buf->file_pos;
diff --git a/src/os/unix/ngx_solaris_sendfilev_chain.c b/src/os/unix/ngx_solaris_sendfilev_chain.c
index ebccae8fa..04e33666a 100644
--- a/src/os/unix/ngx_solaris_sendfilev_chain.c
+++ b/src/os/unix/ngx_solaris_sendfilev_chain.c
@@ -135,7 +135,7 @@ ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
size = limit - send;
aligned = (cl->buf->file_pos + size + ngx_pagesize - 1)
- & ~(ngx_pagesize - 1);
+ & ~((off_t) ngx_pagesize - 1);
if (aligned <= cl->buf->file_last) {
size = aligned - cl->buf->file_pos;