diff --git a/src/common.c b/src/common.c index 19fdb95..6a40924 100644 --- a/src/common.c +++ b/src/common.c @@ -125,7 +125,12 @@ get_addr(char *host, int port, int addr_family, int flags, struct sockaddr_stora memset(&hints, 0, sizeof(hints)); hints.ai_family = addr_family; +#ifdef WINDOWS32 + /* AI_ADDRCONFIG misbehaves on windows */ + hints.ai_flags = flags; +#else hints.ai_flags = AI_ADDRCONFIG | flags; +#endif hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; diff --git a/src/osflags b/src/osflags index 2d8a03b..4641b39 100755 --- a/src/osflags +++ b/src/osflags @@ -26,9 +26,6 @@ link) ;; cflags) case $1 in - windows32) - echo '-DWINVER=0x0501'; - ;; BeOS) echo '-Dsocklen_t=int'; ;;