Use getaddrinfo_retro even for dependencies
This commit is contained in:
parent
5f75ce3f12
commit
bbef084955
|
@ -133,6 +133,7 @@ mg_static_assert(sizeof(void *) >= sizeof(int), "data type size check");
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <compat/strl.h>
|
#include <compat/strl.h>
|
||||||
|
#include <net/net_compat.h>
|
||||||
|
|
||||||
/* clock_gettime is not implemented on OSX */
|
/* clock_gettime is not implemented on OSX */
|
||||||
int clock_gettime(int clk_id, struct timespec *t);
|
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));
|
memset(&hints, 0, sizeof(struct addrinfo));
|
||||||
hints.ai_family = af;
|
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 */
|
/* bad src string or bad address family */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,8 @@
|
||||||
#define herror(A) printf("%s\n", A)
|
#define herror(A) printf("%s\n", A)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <net/net_compat.h>
|
||||||
|
|
||||||
#include "connecthostport.h"
|
#include "connecthostport.h"
|
||||||
|
|
||||||
#ifndef MAXHOSTNAMELEN
|
#ifndef MAXHOSTNAMELEN
|
||||||
|
@ -173,7 +175,7 @@ int connecthostport(const char * host, unsigned short port,
|
||||||
strncpy(tmp_host, host, MAXHOSTNAMELEN);
|
strncpy(tmp_host, host, MAXHOSTNAMELEN);
|
||||||
}
|
}
|
||||||
tmp_host[MAXHOSTNAMELEN] = '\0';
|
tmp_host[MAXHOSTNAMELEN] = '\0';
|
||||||
n = getaddrinfo(tmp_host, port_str, &hints, &ai);
|
n = getaddrinfo_retro(tmp_host, port_str, &hints, &ai);
|
||||||
if(n != 0)
|
if(n != 0)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -98,6 +98,8 @@ struct ip_mreqn
|
||||||
#include "miniupnpc.h"
|
#include "miniupnpc.h"
|
||||||
#include "receivedata.h"
|
#include "receivedata.h"
|
||||||
|
|
||||||
|
#include <net/net_compat.h>
|
||||||
|
|
||||||
#if !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__))
|
#if !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__))
|
||||||
|
|
||||||
#include "codelength.h"
|
#include "codelength.h"
|
||||||
|
@ -757,7 +759,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
||||||
hints.ai_family = AF_UNSPEC; /* AF_INET6 or AF_INET */
|
hints.ai_family = AF_UNSPEC; /* AF_INET6 or AF_INET */
|
||||||
hints.ai_socktype = SOCK_DGRAM;
|
hints.ai_socktype = SOCK_DGRAM;
|
||||||
/*hints.ai_flags = */
|
/*hints.ai_flags = */
|
||||||
if ((rv = getaddrinfo(ipv6
|
if ((rv = getaddrinfo_retro(ipv6
|
||||||
? (linklocal ? UPNP_MCAST_LL_ADDR : UPNP_MCAST_SL_ADDR)
|
? (linklocal ? UPNP_MCAST_LL_ADDR : UPNP_MCAST_SL_ADDR)
|
||||||
: UPNP_MCAST_ADDR,
|
: UPNP_MCAST_ADDR,
|
||||||
XSTR(SSDP_PORT), &hints, &servinfo)) != 0) {
|
XSTR(SSDP_PORT), &hints, &servinfo)) != 0) {
|
||||||
|
|
Loading…
Reference in New Issue