From 4130dad793f2e0374da6fcd707d6854fa1aef607 Mon Sep 17 00:00:00 2001 From: kparzysz <48801706+kparzysz@users.noreply.github.com> Date: Fri, 22 Mar 2019 20:24:00 -0500 Subject: [PATCH] Fix setting up hints for getaddrinfo (#2872) --- src/common/socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/socket.h b/src/common/socket.h index fafff97b2522..5c39f409d8e2 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -65,7 +65,7 @@ struct SockAddr { memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_flags = AI_PASSIVE; - hints.ai_protocol = SOCK_STREAM; + hints.ai_socktype = SOCK_STREAM; addrinfo *res = NULL; int sig = getaddrinfo(host, NULL, &hints, &res); CHECK(sig == 0 && res != NULL)