summaryrefslogtreecommitdiffstats
path: root/common/network
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2010-02-12 09:19:32 +0000
committerPierre Ossman <ossman@cendio.se>2010-02-12 09:19:32 +0000
commit4065997c5e952ef25e34b021bdd4eb00a4e79839 (patch)
tree64e726d73d73d43821ffc79c5f07a909fd1f0b53 /common/network
parent657806f8fe2b2156797c68fd03c717ea487688b2 (diff)
downloadtigervnc-4065997c5e952ef25e34b021bdd4eb00a4e79839.tar.gz
tigervnc-4065997c5e952ef25e34b021bdd4eb00a4e79839.zip
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
Diffstat (limited to 'common/network')
-rw-r--r--common/network/TcpSocket.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 75d388d9..8bd817c4 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -364,10 +364,10 @@ TcpListener::TcpListener(const char *listenaddr, int port, bool localhostOnly,
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
{