You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2014/09/16 22:16:42 UTC

git commit: Fix IN6ADDR_LOOPBACK_INIT usage for older compilers

Repository: trafficserver
Updated Branches:
  refs/heads/master ab02e71cb -> a106474f9


Fix IN6ADDR_LOOPBACK_INIT usage for older compilers


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a106474f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a106474f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a106474f

Branch: refs/heads/master
Commit: a106474f9a6bb690530bc5e1d68ac4cd9e0aa4b0
Parents: ab02e71
Author: James Peach <jp...@apache.org>
Authored: Tue Sep 16 13:13:53 2014 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Sep 16 13:13:53 2014 -0700

----------------------------------------------------------------------
 lib/ts/ink_inet.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a106474f/lib/ts/ink_inet.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_inet.h b/lib/ts/ink_inet.h
index 90bfc2f..bfc7ca5 100644
--- a/lib/ts/ink_inet.h
+++ b/lib/ts/ink_inet.h
@@ -1302,7 +1302,8 @@ IpEndpoint::setToLoopback(int family) {
     sin.sin_len = sizeof(sockaddr_in);
 #endif
   } else if (AF_INET6 == family) {
-    sin6.sin6_addr = IN6ADDR_LOOPBACK_INIT;
+    static const struct in6_addr init = IN6ADDR_LOOPBACK_INIT;
+    sin6.sin6_addr = init;
 #if HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN
     sin6.sin6_len = sizeof(sockaddr_in6);
 #endif