diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-01 14:38:28 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-01 14:38:28 +0000 |
commit | 7e1662839a13794af3b0262b8cb99c0965acf072 (patch) | |
tree | 75e53dced5a313f4a446aa344365766adcc1b584 /stream/librtsp/rtsp_rtp.c | |
parent | 0d86a0f652c5a131961d580e2704b1a74478fc7b (diff) | |
download | mpv-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/librtsp/rtsp_rtp.c')
-rw-r--r-- | stream/librtsp/rtsp_rtp.c | 20 |
1 files changed, 8 insertions, 12 deletions
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 |