fix win32

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5401 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2019-02-16 20:32:24 +00:00
parent fa0c73d33b
commit 3867760e75
1 changed files with 5 additions and 5 deletions

View File

@ -364,7 +364,7 @@ iwboolean FTP_V4StringToAdr (const char *s, struct sockaddr_in *addr)
return true; return true;
} }
#if defined(_WIN32) && !defined(_WIN64) && !defined(WEBSVONLY) #if defined(_WIN32) && !defined(WEBSVONLY)
int (WINAPI *pgetaddrinfo) ( int (WINAPI *pgetaddrinfo) (
const char* nodename, const char* nodename,
const char* servname, const char* servname,
@ -373,8 +373,8 @@ iwboolean FTP_V4StringToAdr (const char *s, struct sockaddr_in *addr)
); );
void (WSAAPI *pfreeaddrinfo) (struct addrinfo*); void (WSAAPI *pfreeaddrinfo) (struct addrinfo*);
#else #else
#define qgetaddrinfo getaddrinfo #define pgetaddrinfo getaddrinfo
#define qfreeaddrinfo freeaddrinfo #define pfreeaddrinfo freeaddrinfo
#endif #endif
iwboolean FTP_HostToSockaddr(int prot, char *host, int port, struct sockaddr_qstorage *addr, size_t *addrsize) iwboolean FTP_HostToSockaddr(int prot, char *host, int port, struct sockaddr_qstorage *addr, size_t *addrsize)
@ -397,7 +397,7 @@ iwboolean FTP_HostToSockaddr(int prot, char *host, int port, struct sockaddr_qst
break; break;
} }
Q_snprintfz(service, sizeof(service), "%i", port); Q_snprintfz(service, sizeof(service), "%i", port);
if (qgetaddrinfo(host, service, &hint, &res)) if (pgetaddrinfo(host, service, &hint, &res))
return false; return false;
if (res && res->ai_addr && res->ai_addrlen <= sizeof(*addr)) if (res && res->ai_addr && res->ai_addrlen <= sizeof(*addr))
{ {
@ -405,7 +405,7 @@ iwboolean FTP_HostToSockaddr(int prot, char *host, int port, struct sockaddr_qst
memcpy(addr, res->ai_addr, res->ai_addrlen); memcpy(addr, res->ai_addr, res->ai_addrlen);
r = true; r = true;
} }
qfreeaddrinfo(res); pfreeaddrinfo(res);
return r; return r;
#if 0 #if 0
host = va("[%s]", host); host = va("[%s]", host);