diff options
Diffstat (limited to 'lib/if2ip.c')
-rw-r--r-- | lib/if2ip.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/if2ip.c b/lib/if2ip.c index db28e4aad..966032506 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -65,10 +65,6 @@ #include <sys/sockio.h> #endif -#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL) -#include "inet_ntoa_r.h" -#endif - #ifdef VMS #include <inet.h> #endif @@ -113,12 +109,7 @@ char *Curl_if2ip(const char *interface, char *buf, int buf_size) struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_dstaddr; memcpy(&in, &(s->sin_addr.s_addr), sizeof(in)); -#if defined(HAVE_INET_NTOA_R) - ip = inet_ntoa_r(in,buf,buf_size); -#else - ip = strncpy(buf,inet_ntoa(in),buf_size); - ip[buf_size - 1] = 0; -#endif + ip = Curl_inet_ntop(s->sin_family, &in, buf, buf_size); } sclose(dummy); } |