mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix Windows compilation
This commit is contained in:
parent
e9ee74a941
commit
1221b1f11c
|
@ -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;
|
||||
|
|
|
@ -767,6 +767,8 @@ typedef struct
|
|||
struct iovec iovecs[VLEN];
|
||||
char bufs[VLEN][PACKETSIZE];
|
||||
char sockaddrs[VLEN][128];
|
||||
#else
|
||||
bool dummy;
|
||||
#endif
|
||||
} MMSGS;
|
||||
|
||||
|
|
Loading…
Reference in a new issue