1
mirror of https://github.com/mpv-player/mpv synced 2024-10-14 11:54:36 +02:00

Use inet_ntoa where inet_ntop is not available.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9901 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
bertrand 2003-04-10 10:55:18 +00:00
parent 916276ab2c
commit e19c6d1784

View File

@ -253,7 +253,11 @@ connect2Server_with_af(char *host, int port, int af) {
return -2;
}
inet_ntop(af, our_s_addr, buf, 255);
#ifdef USE_ATON
strncpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255);
#else
inet_ntop(af, our_s_addr, buf, 255);
#endif
mp_msg(MSGT_NETWORK,MSGL_STATUS,"Connecting to server %s[%s]:%d ...\n", host, buf , port );
// Turn the socket as non blocking so we can timeout on the connection