mirror of
https://github.com/osmarks/ngircd.git
synced 2026-03-27 10:19:45 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user