mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-30 05:11:14 +00:00
Fix an issue on Android
http://androidxref.com/5.0.0_r2/xref/bionic/libc/include/netdb.h#164 http://androidxref.com/5.0.0_r2/xref/bionic/libc/dns/net/getaddrinfo.c#627
This commit is contained in:
+1
-1
@@ -171,7 +171,7 @@ int create_and_bind(const char *host, const char *port)
|
||||
memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_family = AF_UNSPEC; /* Return IPv4 and IPv6 choices */
|
||||
hints.ai_socktype = SOCK_STREAM; /* We want a TCP socket */
|
||||
hints.ai_flags = AI_ALL | AI_V4MAPPED | AI_PASSIVE | AI_ADDRCONFIG; /* For wildcard IP address */
|
||||
hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; /* For wildcard IP address */
|
||||
hints.ai_protocol = IPPROTO_TCP;
|
||||
|
||||
s = getaddrinfo(host, port, &hints, &result);
|
||||
|
||||
Reference in New Issue
Block a user