mirror of https://github.com/getdnsapi/getdns.git
Merge pull request #428 from themiron/old-uclibc-fix
Optimize local addresses enumeration with old uClibc
This commit is contained in:
commit
994466b3de
|
@ -1161,7 +1161,7 @@ getdns_context_set_resolvconf(getdns_context *context, const char *resolvconf)
|
|||
|
||||
memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
|
||||
hints.ai_socktype = 0; /* Datagram socket */
|
||||
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
|
||||
hints.ai_flags = AI_NUMERICHOST; /* No reverse name lookups */
|
||||
hints.ai_protocol = 0; /* Any protocol */
|
||||
hints.ai_canonname = NULL;
|
||||
|
@ -2736,7 +2736,7 @@ getdns_context_set_upstream_recursive_servers(struct getdns_context *context,
|
|||
}
|
||||
memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
|
||||
hints.ai_socktype = 0; /* Datagram socket */
|
||||
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
|
||||
hints.ai_flags = AI_NUMERICHOST; /* No reverse name lookups */
|
||||
hints.ai_protocol = 0; /* Any protocol */
|
||||
hints.ai_canonname = NULL;
|
||||
|
|
|
@ -978,6 +978,7 @@ getdns_return_t getdns_context_set_listen_addresses(
|
|||
|
||||
(void) memset(&hints, 0, sizeof(struct addrinfo));
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
hints.ai_flags = AI_NUMERICHOST;
|
||||
|
||||
for (i = 0; !r && i < new_set_count; i++) {
|
||||
|
|
Loading…
Reference in New Issue