summaryrefslogtreecommitdiff
path: root/lib/krb4.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-09-23 19:16:56 +0000
committerYang Tse <yangsita@gmail.com>2008-09-23 19:16:56 +0000
commitc9ad95260400f0dbf056d44e0eccc8b0a351f504 (patch)
tree0b3bb1ef57205b53b84842d0c65c4dbd72edc5cc /lib/krb4.c
parent2a09ffc648ed9d57066cf8a6e25205c8669e71a0 (diff)
downloadcurl-c9ad95260400f0dbf056d44e0eccc8b0a351f504.tar.gz
Replace inet_ntoa and inet_ntoa_r with Curl_inet_ntop
Diffstat (limited to 'lib/krb4.c')
-rw-r--r--lib/krb4.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/krb4.c b/lib/krb4.c
index 84ce9e6bb..a227b2e8f 100644
--- a/lib/krb4.c
+++ b/lib/krb4.c
@@ -62,12 +62,9 @@
#include "ftp.h"
#include "sendf.h"
#include "krb4.h"
+#include "inet_ntop.h"
#include "memory.h"
-#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
-#include "inet_ntoa_r.h"
-#endif
-
/* The last #include file should be: */
#include "memdebug.h"
@@ -242,13 +239,9 @@ krb4_auth(void *app_data, struct connectdata *conn)
krb_realmofhost(host));
else {
if(natAddr.s_addr != localaddr->sin_addr.s_addr) {
-#ifdef HAVE_INET_NTOA_R
- char ntoa_buf[64];
- char *ip = (char *)inet_ntoa_r(natAddr, ntoa_buf, sizeof(ntoa_buf));
-#else
- char *ip = (char *)inet_ntoa(natAddr);
-#endif
- infof(data, "Using NAT IP address (%s) for kerberos 4\n", ip);
+ char addr_buf[128];
+ if(Curl_inet_ntop(AF_INET, natAddr, addr_buf, sizeof(addr_buf)))
+ infof(data, "Using NAT IP address (%s) for kerberos 4\n", addr_buf);
localaddr->sin_addr = natAddr;
}
}