inet_ntoa() want's the address directly, not a pointer to it
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 3129a93..d123875 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -274,7 +274,7 @@
     return rfb::strDup("");
   }
 
-  char* name = inet_ntoa(addr);
+  char* name = inet_ntoa(sa.u.sin.sin_addr);
 #endif /* HAVE_INET_PTON */
   if (name) {
     return rfb::strDup(name);