From 4c115efc45a7e01c36792fd99d7438e6f7352fff Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 26 Mar 2015 13:59:12 +0000 Subject: [PATCH] Fix non-ipv6 socks compile --- src/src/transports/smtp_socks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/src/transports/smtp_socks.c b/src/src/transports/smtp_socks.c index cf9f73ba3..77f71ba36 100644 --- a/src/src/transports/smtp_socks.c +++ b/src/src/transports/smtp_socks.c @@ -229,6 +229,7 @@ while ((proxy_spec = string_nextinlist(&proxy_list, &sep, NULL, 0))) /* send connect (ipver, ipaddr, port) */ buf[0] = 5; buf[1] = 1; buf[2] = 0; buf[3] = host_af == AF_INET6 ? 4 : 1; +#if HAVE_IPV6 if (host_af == AF_INET6) { memcpy(buf+4, &sin.v6.sin6_addr, sizeof(sin.v6.sin6_addr)); @@ -237,6 +238,7 @@ while ((proxy_spec = string_nextinlist(&proxy_list, &sep, NULL, 0))) size = 4+sizeof(sin.v6.sin6_addr)+sizeof(sin.v6.sin6_port); } else +#endif { memcpy(buf+4, &sin.v4.sin_addr.s_addr, sizeof(sin.v4.sin_addr.s_addr)); memcpy(buf+4+sizeof(sin.v4.sin_addr.s_addr), -- 2.25.1