View | Details | Raw Unified | Return to bug 223288 | Differences between
and this patch

Collapse All | Expand All

(-)patch-patch-src__network.c (-19 lines)
Lines 1-19 Link Here
1
--- patch-src_network.c.orig	2017-10-28 15:54:22 UTC
2
+++ patch-src_network.c
3
@@ -0,0 +1,16 @@
4
+--- src/network.c.orig	2017-10-28 14:00:17 UTC
5
++++ src/network.c
6
+@@ -77,9 +77,13 @@ static void network_host_normalize_addr_
7
+     if (addr->plain.sa_family == AF_INET6)
8
+         buffer_append_string_len(host, CONST_STR_LEN("]"));
9
+     if (addr->plain.sa_family != AF_UNIX) {
10
++#ifdef HAVE_IPV6
11
+         unsigned short port = (addr->plain.sa_family == AF_INET)
12
+           ? ntohs(addr->ipv4.sin_port)
13
+           : ntohs(addr->ipv6.sin6_port);
14
++#elif
15
++	unsigned short port = ntohs(addr->ipv6.sin6_port);
16
++#endif
17
+         buffer_append_string_len(host, CONST_STR_LEN(":"));
18
+         buffer_append_int(host, (int)port);
19
+     }
(-)patch-src_network.c (+16 lines)
Line 0 Link Here
1
--- src/network.c.orig	2017-10-28 14:00:17 UTC
2
+++ src/network.c
3
@@ -77,9 +77,13 @@ static void network_host_normalize_addr_
4
     if (addr->plain.sa_family == AF_INET6)
5
         buffer_append_string_len(host, CONST_STR_LEN("]"));
6
     if (addr->plain.sa_family != AF_UNIX) {
7
+#ifdef HAVE_IPV6
8
         unsigned short port = (addr->plain.sa_family == AF_INET)
9
           ? ntohs(addr->ipv4.sin_port)
10
           : ntohs(addr->ipv6.sin6_port);
11
+#elif
12
+	unsigned short port = ntohs(addr->ipv.sin_port);
13
+#endif
14
         buffer_append_string_len(host, CONST_STR_LEN(":"));
15
         buffer_append_int(host, (int)port);
16
     }

Return to bug 223288