changeset 9900:f36b9dda3082

Use inet_ntoa where inet_ntop is not available.
author bertrand
date Thu, 10 Apr 2003 10:55:18 +0000
parents 248c478a0699
children 233802490b0e
files libmpdemux/network.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/network.c	Thu Apr 10 08:34:43 2003 +0000
+++ b/libmpdemux/network.c	Thu Apr 10 10:55:18 2003 +0000
@@ -253,7 +253,11 @@
 			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