diff --git a/src/base/system.c b/src/base/system.c index 77ade8dbb..6738992c4 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -1525,12 +1525,13 @@ int net_udp_send(NETSOCKET sock, const NETADDR *addr, const void *data, int size void net_init_mmsgs(MMSGS* m) { #if defined(CONF_PLATFORM_LINUX) + int i; m->pos = 0; m->size = 0; mem_zero(m->msgs, sizeof(m->msgs)); mem_zero(m->iovecs, sizeof(m->iovecs)); mem_zero(m->sockaddrs, sizeof(m->sockaddrs)); - for(int i = 0; i < VLEN; ++i) + for(i = 0; i < VLEN; ++i) { m->iovecs[i].iov_base = m->bufs[i]; m->iovecs[i].iov_len = PACKETSIZE; diff --git a/src/base/system.h b/src/base/system.h index fdaa816cf..56e12c728 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -767,6 +767,8 @@ typedef struct struct iovec iovecs[VLEN]; char bufs[VLEN][PACKETSIZE]; char sockaddrs[VLEN][128]; +#else + bool dummy; #endif } MMSGS;