Project

General

Profile

Bug #3484 ยป io_copy_stream_sendfile.patch

patch to fix the issue - normalperson (Eric Wong), 06/26/2010 11:27 AM

View differences:

io.c
#endif
static ssize_t
simple_sendfile(int out_fd, int in_fd, off_t *offset, size_t count)
simple_sendfile(int out_fd, int in_fd, off_t *offset, off_t count)
{
return sendfile(out_fd, in_fd, offset, count);
#if SIZEOF_OFF_T > SIZEOF_SIZE_T
/* we are limited by the 32-bit ssize_t return value on 32-bit */
static const ssize_t ssize_t_max = ((size_t)-1) >> 1;
if (count > (off_t)ssize_t_max)
count = ssize_t_max;
#endif
return sendfile(out_fd, in_fd, offset, (size_t)count);
}
#endif
    (1-1/1)