Project

General

Profile

Bug #2123 ยป network_writev.diff

Proposed fix - davidm, 2009-12-18 03:01

View differences:

src/network_writev.c 2009-12-17 19:52:26.000000000 -0700
chunk *tc;
size_t num_bytes = 0;
#if defined(_SC_IOV_MAX) /* IRIX, MacOS X, FreeBSD, Solaris, ... */
const size_t max_chunks = sysconf(_SC_IOV_MAX);
size_t max_chunks;
int v = sysconf(_SC_IOV_MAX);
if (v == -1)
max_chunks = 1024;
else
max_chunks = v;
#elif defined(IOV_MAX) /* Linux x86 (glibc-2.3.6-3) */
const size_t max_chunks = IOV_MAX;
#elif defined(MAX_IOVEC) /* Linux ia64 (glibc-2.3.3-98.28) */
    (1-1/1)