# HG changeset patch # User reimar # Date 1314213362 0 # Node ID 25de7f7ee57cb844eedba4cb9c2706293daff1b6 # Parent 6c1d39323b6eec92014c77d0523f4e860645f39e Set receive timeout correctly on Windows. diff -r 6c1d39323b6e -r 25de7f7ee57c udp_sync.c --- a/udp_sync.c Wed Aug 24 18:54:08 2011 +0000 +++ b/udp_sync.c Wed Aug 24 19:16:02 2011 +0000 @@ -95,7 +95,11 @@ static int sockfd = -1; if (sockfd == -1) { +#if HAVE_WINSOCK2_H + DWORD tv = 30000; +#else struct timeval tv = { .tv_sec = 30 }; +#endif struct sockaddr_in servaddr = { 0 }; startup();