mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 06:41:26 +00: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
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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';
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue