summaryrefslogtreecommitdiffstats
path: root/stream/tcp.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-01 14:38:28 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-01 14:38:28 +0000
commit7e1662839a13794af3b0262b8cb99c0965acf072 (patch)
tree75e53dced5a313f4a446aa344365766adcc1b584 /stream/tcp.c
parent0d86a0f652c5a131961d580e2704b1a74478fc7b (diff)
downloadmpv-7e1662839a13794af3b0262b8cb99c0965acf072.tar.bz2
mpv-7e1662839a13794af3b0262b8cb99c0965acf072.tar.xz
Restructure network tests: Always check for both inet_aton and inet_pton.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28439 b3059339-0415-0410-9bf9-f77b7e298cf2
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
{