diff options
author | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-10 10:55:18 +0000 |
---|---|---|
committer | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-10 10:55:18 +0000 |
commit | e19c6d1784d4d7af9d9a1a875fdd13d25cbf1e58 (patch) | |
tree | 73a652192850d2bbff60547c86a372ad75be1e17 /libmpdemux/network.c | |
parent | 916276ab2ccc0c1717d96d0ce4410c7a590b7a71 (diff) | |
download | mpv-e19c6d1784d4d7af9d9a1a875fdd13d25cbf1e58.tar.bz2 mpv-e19c6d1784d4d7af9d9a1a875fdd13d25cbf1e58.tar.xz |
Use inet_ntoa where inet_ntop is not available.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9901 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/network.c')
-rw-r--r-- | libmpdemux/network.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpdemux/network.c b/libmpdemux/network.c index 3a9eaad478..96c5eccece 100644 --- a/libmpdemux/network.c +++ b/libmpdemux/network.c @@ -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 |