aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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;
}
}