Fix Windows compilation

This commit is contained in:
Dennis Felsing 2018-12-17 14:44:19 +01:00
parent e9ee74a941
commit 1221b1f11c
2 changed files with 4 additions and 1 deletions

View file

@ -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;

View file

@ -767,6 +767,8 @@ typedef struct
struct iovec iovecs[VLEN];
char bufs[VLEN][PACKETSIZE];
char sockaddrs[VLEN][128];
#else
bool dummy;
#endif
} MMSGS;