diff --git a/src/http.c b/src/http.c index 2d054251..703c58ca 100644 --- a/src/http.c +++ b/src/http.c @@ -584,11 +584,11 @@ int tf_http_listen(tf_http_t* http, int port, tf_tls_context_t* tls) if (r == 0) { - struct sockaddr_in addr = + struct sockaddr_in6 addr = { - .sin_family = AF_INET, - .sin_addr = { .s_addr = INADDR_ANY }, - .sin_port = ntohs(port), + .sin6_family = AF_INET6, + .sin6_addr = IN6ADDR_ANY_INIT, + .sin6_port = ntohs(port), }; r = uv_tcp_bind(&listener->tcp, (struct sockaddr*)&addr, 0); if (r)