diff src/os/unix/ngx_linux_sendfile_chain.c @ 1182:df449f4a8032

fix sendfile on 64-bit Linux and limit_rate on all 64-bit platforms for 2G+ files
author Igor Sysoev <igor@sysoev.ru>
date Mon, 23 Apr 2007 21:32:13 +0000
parents 8e446a2daf48
children f4d6c84c69f9
line wrap: on
line diff
--- 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_
                     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;