diff options
-rw-r--r-- | sockutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -111,7 +111,7 @@ connect_to_host(char *hostname, int port, unsigned short *ss_family) memset(portstr, 0, sizeof portstr); snprintf(portstr, NI_MAXSERV, "%d", port); - if ((err = getaddrinfo(hostname, portstr, NULL, &ail)) != 0) { + if ((err = getaddrinfo(hostname, portstr, &hints, &ail)) != 0) { fprintf(stderr, "Could not resolve hostname %s: %s\n", hostname, gai_strerror(err)); return -1; |