1
0
mirror of https://github.com/yarrick/iodine.git synced 2024-11-25 22:46:05 +03:00

Do not use AI_ADDRCONFIG on Windows

It was not available on my MinGW crosscompiler,
and it may be harmful:
https://code.google.com/p/chromium/issues/detail?id=5234

Also, remove old conflicting WINVER in osflags.
It is set in src/windows.h now.
This commit is contained in:
Erik Ekman 2014-02-05 22:53:47 +01:00
parent a1d88c4f0a
commit 400f45c793
2 changed files with 5 additions and 3 deletions

View File

@ -125,7 +125,12 @@ get_addr(char *host, int port, int addr_family, int flags, struct sockaddr_stora
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_family = addr_family; hints.ai_family = addr_family;
#ifdef WINDOWS32
/* AI_ADDRCONFIG misbehaves on windows */
hints.ai_flags = flags;
#else
hints.ai_flags = AI_ADDRCONFIG | flags; hints.ai_flags = AI_ADDRCONFIG | flags;
#endif
hints.ai_socktype = SOCK_DGRAM; hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP; hints.ai_protocol = IPPROTO_UDP;

View File

@ -26,9 +26,6 @@ link)
;; ;;
cflags) cflags)
case $1 in case $1 in
windows32)
echo '-DWINVER=0x0501';
;;
BeOS) BeOS)
echo '-Dsocklen_t=int'; echo '-Dsocklen_t=int';
;; ;;