mirror of
https://github.com/yarrick/iodine.git
synced 2024-12-26 15:03:31 +02: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:
parent
a1d88c4f0a
commit
400f45c793
2 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -26,9 +26,6 @@ link)
|
|||
;;
|
||||
cflags)
|
||||
case $1 in
|
||||
windows32)
|
||||
echo '-DWINVER=0x0501';
|
||||
;;
|
||||
BeOS)
|
||||
echo '-Dsocklen_t=int';
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue