about summary refs log tree commit diff
path: root/doc/Makefile.am
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2009-09-14 00:25:48 +0200
committerAlexander Barton <alex@barton.de>2009-09-14 01:07:39 +0200
commitd5f80b2a8deda30d0dcd69bea81a3ca862cf46ca (patch)
treefc534dd243fdb5145341b81021396445ece1f167 /doc/Makefile.am
parent60fc4d6335a2696f88532322b797978ef9e9005f (diff)
downloadngircd-d5f80b2a8deda30d0dcd69bea81a3ca862cf46ca.tar.gz
ngircd-d5f80b2a8deda30d0dcd69bea81a3ca862cf46ca.zip
Always use get{addr|name}info() when available
Both getaddrinfo() and getnameinfo() are now used always when available, and
not only when compiling ngIRCd with support for IPv6.

This not only enables ngIRCd to handle multiple addresses per hostname when
compiled without support for IPv6, but fixes binding ngIRCd to IP addresses
on Mac OS X (and probably other BSD-based systems) as well: these systems
require that sockaddr_in is zeroed out and sockaddr_in.sin_len is set to
sizeof(sockaddr_in) like that:

  src/ipaddr/ng_ipaddr.c, line 54:

        assert(ip_str);
      + memset(addr, 0, sizeof *addr);
      + addr->sin4.sin_len = sizeof(addr->sin4);
        addr->sin4.sin_family = AF_INET;

But this would break all the systems not using sockaddr_in.sin_len, for
example Linux -- so we assume that all these systems provide getaddrinfo()
and use that for now.
Diffstat (limited to 'doc/Makefile.am')
0 files changed, 0 insertions, 0 deletions