From 57a713c67ce8fa3273a05034173ede9028b82ac6 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 23 Apr 2007 21:32:13 +0000 Subject: fix sendfile on 64-bit Linux and limit_rate on all 64-bit platforms for 2G+ files --- src/os/unix/ngx_linux_sendfile_chain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/os/unix/ngx_linux_sendfile_chain.c') 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; -- cgit