From 04af1f0053835e014c55512ecaded4f0072fcd5c Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 31 Dec 2023 03:42:07 +0000 Subject: [PATCH] I think it we ask for AF_INET6, we get 4+6. Let's do that. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4719 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/http.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)