diff --git a/src/common/socket.h b/src/common/socket.h index fafff97b25226..5c39f409d8e21 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)