From bbef084955fcca26ff9e02a0a3bbe7146a2cea0e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 May 2017 14:22:30 +0200 Subject: [PATCH] Use getaddrinfo_retro even for dependencies --- deps/civetweb/civetweb.c | 3 ++- deps/miniupnpc/connecthostport.c | 4 +++- deps/miniupnpc/minissdpc.c | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/deps/civetweb/civetweb.c b/deps/civetweb/civetweb.c index 0692c44ea6..1248a620dd 100644 --- a/deps/civetweb/civetweb.c +++ b/deps/civetweb/civetweb.c @@ -133,6 +133,7 @@ mg_static_assert(sizeof(void *) >= sizeof(int), "data type size check"); #include #include +#include /* clock_gettime is not implemented on OSX */ int clock_gettime(int clk_id, struct timespec *t); @@ -5727,7 +5728,7 @@ mg_inet_pton(int af, const char *src, void *dst, size_t dstlen) memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = af; - if (getaddrinfo(src, NULL, &hints, &res) != 0) { + if (getaddrinfo_retro(src, NULL, &hints, &res) != 0) { /* bad src string or bad address family */ return 0; } diff --git a/deps/miniupnpc/connecthostport.c b/deps/miniupnpc/connecthostport.c index 8f4d1b5207..8eabfca0d2 100644 --- a/deps/miniupnpc/connecthostport.c +++ b/deps/miniupnpc/connecthostport.c @@ -53,6 +53,8 @@ #define herror(A) printf("%s\n", A) #endif +#include + #include "connecthostport.h" #ifndef MAXHOSTNAMELEN @@ -173,7 +175,7 @@ int connecthostport(const char * host, unsigned short port, strncpy(tmp_host, host, MAXHOSTNAMELEN); } tmp_host[MAXHOSTNAMELEN] = '\0'; - n = getaddrinfo(tmp_host, port_str, &hints, &ai); + n = getaddrinfo_retro(tmp_host, port_str, &hints, &ai); if(n != 0) { #ifdef _WIN32 diff --git a/deps/miniupnpc/minissdpc.c b/deps/miniupnpc/minissdpc.c index dfb2d43ec7..c015298b97 100644 --- a/deps/miniupnpc/minissdpc.c +++ b/deps/miniupnpc/minissdpc.c @@ -98,6 +98,8 @@ struct ip_mreqn #include "miniupnpc.h" #include "receivedata.h" +#include + #if !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__)) #include "codelength.h" @@ -757,7 +759,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[], hints.ai_family = AF_UNSPEC; /* AF_INET6 or AF_INET */ hints.ai_socktype = SOCK_DGRAM; /*hints.ai_flags = */ - if ((rv = getaddrinfo(ipv6 + if ((rv = getaddrinfo_retro(ipv6 ? (linklocal ? UPNP_MCAST_LL_ADDR : UPNP_MCAST_SL_ADDR) : UPNP_MCAST_ADDR, XSTR(SSDP_PORT), &hints, &servinfo)) != 0) {