Check for working getaddrinfo() function

At least AIX 4.3.3 and 5.1 have a broken implementation of getaddrinfo()
which doesn't handle "0" as numeric service correctly. This patch adds
a configure check for this case and changes all calling functions to only
use getaddrinfo() if it "works".

See <http://www.stacken.kth.se/lists/heimdal-discuss/2004-05/msg00059.html>

(cherry picked from commit b8433e9261)

Conflicts:
	configure.ng
This commit is contained in:
Alexander Barton committed 2013-12-27 22:02:29 +01:00
1 parent e379a0881e
commit 21ef762109
3 files changed
+35 -4

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@
GLOBAL bool
ng_ipaddr_init(ng_ipaddr_t *addr, const char *ip_str, UINT16 port)
{
#ifdef HAVE_GETADDRINFO
#ifdef HAVE_WORKING_GETADDRINFO
int ret;
char portstr[64];
struct addrinfo *res0;
+1 -1
View File
@@ -242,7 +242,7 @@ ForwardLookup(const char *hostname, array *IpAddr, int af)
{
ng_ipaddr_t addr;
#ifdef HAVE_GETADDRINFO
#ifdef HAVE_WORKING_GETADDRINFO
int res;
struct addrinfo *a, *ai_results;
static struct addrinfo hints;