summaryrefslogtreecommitdiffstats
path: root/stream/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/tcp.c')
-rw-r--r--stream/tcp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/stream/tcp.c b/stream/tcp.c
index 2cabc5e036..ac3165b1a7 100644
--- a/stream/tcp.c
+++ b/stream/tcp.c
@@ -115,13 +115,11 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
memset(&server_address, 0, sizeof(server_address));
-#if !HAVE_WINSOCK2_H
-#if HAVE_INET_ATON
- if (inet_aton(host, our_s_addr)!=1)
-#else
+#if HAVE_INET_PTON
if (inet_pton(af, host, our_s_addr)!=1)
-#endif
-#else
+#elif HAVE_INET_ATON
+ if (inet_aton(host, our_s_addr)!=1)
+#elif HAVE_WINSOCK2_H
if ( inet_addr(host)==INADDR_NONE )
#endif
{