udp_server: don't use MSG_DONTWAIT on WIN32
Doesn't exist on mingw32.
This commit is contained in:
parent
062948b110
commit
ec7d8fb6bd
|
@ -57,7 +57,11 @@ udp_in_event(G_GNUC_UNUSED GIOChannel *source,
|
||||||
socklen_t address_length = sizeof(address_storage);
|
socklen_t address_length = sizeof(address_storage);
|
||||||
|
|
||||||
ssize_t nbytes = recvfrom(udp->fd, udp->buffer, sizeof(udp->buffer),
|
ssize_t nbytes = recvfrom(udp->fd, udp->buffer, sizeof(udp->buffer),
|
||||||
|
#ifdef WIN32
|
||||||
|
0,
|
||||||
|
#else
|
||||||
MSG_DONTWAIT,
|
MSG_DONTWAIT,
|
||||||
|
#endif
|
||||||
address, &address_length);
|
address, &address_length);
|
||||||
if (nbytes <= 0)
|
if (nbytes <= 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue