udp_server: don't use MSG_DONTWAIT on WIN32

Doesn't exist on mingw32.
This commit is contained in:
Max Kellermann 2011-08-31 08:32:04 +02:00
parent 062948b110
commit ec7d8fb6bd
1 changed files with 4 additions and 0 deletions

View File

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