Mercurial > mplayer.hg
diff stream/librtsp/rtsp_rtp.c @ 28404:613f075b4ef0
Restructure network tests: Always check for both inet_aton and inet_pton.
author | diego |
---|---|
date | Sun, 01 Feb 2009 14:38:28 +0000 |
parents | c884d17bd005 |
children | 5b749a93fc89 |
line wrap: on
line diff
--- a/stream/librtsp/rtsp_rtp.c Sun Feb 01 14:00:50 2009 +0000 +++ b/stream/librtsp/rtsp_rtp.c Sun Feb 01 14:38:28 2009 +0000 @@ -297,13 +297,11 @@ 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 +#if HAVE_INET_PTON + inet_pton (AF_INET, hostname, &sin.sin_addr); +#elif HAVE_INET_ATON inet_aton (hostname, &sin.sin_addr); -#else - inet_pton (AF_INET, hostname, &sin.sin_addr); -#endif -#else +#elif HAVE_WINSOCK2_H sin.sin_addr.s_addr = htonl (INADDR_ANY); #endif sin.sin_port = htons (port); @@ -386,13 +384,11 @@ sin.sin_family = AF_INET; -#if !HAVE_WINSOCK2_H -#if HAVE_INET_ATON +#if HAVE_INET_PTON + inet_pton (AF_INET, addr, &sin.sin_addr); +#elif HAVE_INET_ATON inet_aton (addr, &sin.sin_addr); -#else - inet_pton (AF_INET, addr, &sin.sin_addr); -#endif -#else +#elif HAVE_WINSOCK2_H sin.sin_addr.s_addr = htonl (INADDR_ANY); #endif