From c72a86272446c0e4fb33c68601563549044b29e6 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 28 Nov 2024 18:27:13 +0000 Subject: [PATCH] Fix build failures with NO_IPV6 defined. In commit 20f818af1201277 I renamed a lot of variables called 'ret', by using clang-rename to do the heavy lifting. But clang-rename only saw instances of the variable name that the _compiler_ saw. The ones that never got through the preprocessor weren't renamed, and I didn't eyeball the patch hard enough to find instances in the #else branch of ifdefs that should also have been renamed. Thanks to Lars Wendler for the report and the fixes. --- unix/network.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/unix/network.c b/unix/network.c index 2ebd76af..00848ab8 100644 --- a/unix/network.c +++ b/unix/network.c @@ -279,7 +279,7 @@ SockAddr *sk_nonamelookup(const char *host) #ifndef NO_IPV6 addr->ais = NULL; #else - ret->addresses = NULL; + addr->addresses = NULL; #endif addr->refcount = 1; return addr; @@ -907,7 +907,7 @@ Socket *sk_newlistener(const char *srcaddr, int port, Plug *plug, u.sin.sin_addr.s_addr = inet_addr(srcaddr); if (u.sin.sin_addr.s_addr != (in_addr_t)(-1)) { /* Override localhost_only with specified listen addr. */ - ret->localhost_only = ipv4_is_loopback(u.sin.sin_addr); + s->localhost_only = ipv4_is_loopback(u.sin.sin_addr); } addr = &u; addrlen = sizeof(u.sin); @@ -1641,8 +1641,8 @@ SockAddr *platform_get_x11_unix_address(const char *sockpath, int displaynum) #ifndef NO_IPV6 addr->ais = NULL; #else - ret->addresses = NULL; - ret->naddresses = 0; + addr->addresses = NULL; + addr->naddresses = 0; #endif addr->refcount = 1; return addr; @@ -1666,8 +1666,8 @@ SockAddr *unix_sock_addr(const char *path) #ifndef NO_IPV6 addr->ais = NULL; #else - ret->addresses = NULL; - ret->naddresses = 0; + addr->addresses = NULL; + addr->naddresses = 0; #endif addr->refcount = 1; return addr; -- 2.20.1