summaryrefslogtreecommitdiffstats
path: root/sockutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'sockutil.c')
-rw-r--r--sockutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sockutil.c b/sockutil.c
index 824f378..14a058d 100644
--- a/sockutil.c
+++ b/sockutil.c
@@ -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;