aboutsummaryrefslogtreecommitdiff
path: root/lib/if2ip.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2005-03-15 21:00:46 +0000
committerDan Fandrich <dan@coneharvesters.com>2005-03-15 21:00:46 +0000
commitefaf6886505cd29084af05aa06edc19fd71bdfe9 (patch)
tree471544cf284f9dc3e37b602e2acc9b44d440986e /lib/if2ip.c
parent9a5c21c16f12fc3a54f94cad5a95b14e794e9009 (diff)
Fixed ftp support with uClibc due to differing inet_ntoa_r() behaviour.
Diffstat (limited to 'lib/if2ip.c')
-rw-r--r--lib/if2ip.c11
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);
}