comparison src/os/unix/ngx_freebsd_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 9262f520ce21
children f69d1aab6a0f
comparison
equal deleted inserted replaced
1181:ea5ecb1aae88 1182:df449f4a8032
152 152
153 if (send + size > limit) { 153 if (send + size > limit) {
154 size = limit - send; 154 size = limit - send;
155 155
156 aligned = (cl->buf->file_pos + size + ngx_pagesize - 1) 156 aligned = (cl->buf->file_pos + size + ngx_pagesize - 1)
157 & ~(ngx_pagesize - 1); 157 & ~((off_t) ngx_pagesize - 1);
158 158
159 if (aligned <= cl->buf->file_last) { 159 if (aligned <= cl->buf->file_last) {
160 size = aligned - cl->buf->file_pos; 160 size = aligned - cl->buf->file_pos;
161 } 161 }
162 } 162 }