Max Lv
2015-01-27 20:45:51 +08:00
parent 2cc1824fc1
commit b672c4ce7f
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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);