From 5e1cff52d87522e66b7915a89e769ae0149eddd3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 3 Jun 2013 17:08:04 +0100 Subject: [PATCH] Correctly use ai_family for socket(2) call. --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 4a8f1aa05..56f6c5f26 100644 --- a/src/util.c +++ b/src/util.c @@ -95,7 +95,7 @@ make_inet_socket (gint type, struct addrinfo *addr, gboolean is_server, gboolean cur = addr; while (cur) { /* Create socket */ - fd = socket (cur->ai_protocol, type, 0); + fd = socket (cur->ai_family, type, 0); if (fd == -1) { msg_warn ("socket failed: %d, '%s'", errno, strerror (errno)); goto out; -- 2.39.5