Do not look at errno for getaddrinfo() errors
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 1ed6df0..21c532b 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -668,6 +668,7 @@
 #ifdef HAVE_GETADDRINFO
   struct addrinfo *ai, *current, hints;
   char service[16];
+  int result;
 
   initSockets();
 
@@ -681,8 +682,9 @@
 
   snprintf (service, sizeof (service) - 1, "%d", port);
   service[sizeof (service) - 1] = '\0';
-  if ((getaddrinfo(addr, service, &hints, &ai)) != 0)
-    throw rdr::SystemException("getaddrinfo", errorNumber);
+  if ((result = getaddrinfo(addr, service, &hints, &ai)) != 0)
+    throw rdr::Exception("unable to resolve listening address: %s",
+                         gai_strerror(result));
 
   for (current = ai; current != NULL; current = current->ai_next) {
     switch (current->ai_family) {