From 7e1662839a13794af3b0262b8cb99c0965acf072 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 1 Feb 2009 14:38:28 +0000 Subject: 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 --- stream/librtsp/rtsp_rtp.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'stream/librtsp/rtsp_rtp.c') diff --git a/stream/librtsp/rtsp_rtp.c b/stream/librtsp/rtsp_rtp.c index 0d84480a6b..54a2180375 100644 --- a/stream/librtsp/rtsp_rtp.c +++ b/stream/librtsp/rtsp_rtp.c @@ -297,13 +297,11 @@ rtp_connect (char *hostname, int port) if (!hostname || !strcmp (hostname, "0.0.0.0")) sin.sin_addr.s_addr = htonl (INADDR_ANY); else -#if !HAVE_WINSOCK2_H -#if HAVE_INET_ATON - inet_aton (hostname, &sin.sin_addr); -#else +#if HAVE_INET_PTON inet_pton (AF_INET, hostname, &sin.sin_addr); -#endif -#else +#elif HAVE_INET_ATON + inet_aton (hostname, &sin.sin_addr); +#elif HAVE_WINSOCK2_H sin.sin_addr.s_addr = htonl (INADDR_ANY); #endif sin.sin_port = htons (port); @@ -386,13 +384,11 @@ is_multicast_address (char *addr) sin.sin_family = AF_INET; -#if !HAVE_WINSOCK2_H -#if HAVE_INET_ATON - inet_aton (addr, &sin.sin_addr); -#else +#if HAVE_INET_PTON inet_pton (AF_INET, addr, &sin.sin_addr); -#endif -#else +#elif HAVE_INET_ATON + inet_aton (addr, &sin.sin_addr); +#elif HAVE_WINSOCK2_H sin.sin_addr.s_addr = htonl (INADDR_ANY); #endif -- cgit v1.2.3