mirror of
https://github.com/curl/curl.git
synced 2025-02-17 14:59:45 +08:00
Replace inet_ntoa and inet_ntoa_r with Curl_inet_ntop
This commit is contained in:
parent
2a09ffc648
commit
c9ad952604
15
lib/krb4.c
15
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user