Do a generic check for inet_aton instead of just assuming that only Win32 has
the problem.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3982 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 75d388d..8bd817c 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -364,10 +364,10 @@
   if (localhostOnly) {
     addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
   } else if (listenaddr != NULL) {
-#ifndef WIN32
+#ifdef HAVE_INET_ATON
     if (inet_aton(listenaddr, &addr.sin_addr) == 0)
 #else
-    /* Windows doesn't have inet_aton, sigh */
+    /* Some systems (e.g. Windows) do not have inet_aton, sigh */
     if ((addr.sin_addr.s_addr = inet_addr(listenaddr)) == INADDR_NONE)
 #endif
     {
diff --git a/configure.ac b/configure.ac
index 11311c5..5600154 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,6 +138,7 @@
 
 # Network functions
 AC_SEARCH_LIBS([inet_aton], [resolv])
+AC_CHECK_FUNCS([inet_aton])
 
 # IPv6 related functions
 AC_CHECK_FUNCS([inet_ntop getaddrinfo])