INN commit: trunk (CONTRIBUTORS lib/network.c)

Russ Allbery rra at stanford.edu
Mon Oct 27 05:13:25 UTC 2008


INN Commit <Russ_Allbery at isc.org> writes:

>     Date: Saturday, October 25, 2008 @ 10:13:34
>   Author: iulius
> Revision: 8145
>
> EAI_ADDRFAMILY was obsoleted with RFC 3493.
> Thanks to Wolfgang M. Weyand for having pointed that out
> (it causes compilation issues).

> Modified: lib/network.c
> ===================================================================
> --- lib/network.c	2008-10-25 17:06:15 UTC (rev 8144)
> +++ lib/network.c	2008-10-25 17:13:34 UTC (rev 8145)
> @@ -332,7 +332,7 @@
>      error = getaddrinfo(NULL, service, &hints, &addrs);
>      if (error < 0) {
>  #ifdef IPV6_V6ONLY
> -        if (error != EAI_ADDRFAMILY && error != EAI_FAMILY)
> +        if (error != EAI_FAMILY)
>  #endif
>              warn("getaddrinfo failed: %s", gai_strerror(error));
>          return;

I'd tend to fix this with:

#ifundef EAI_ADDRFAMILY
# define EAI_ADDRFAMILY EAI_FAMILY
#endif

instead in portable/socket.h and leaving the if statement, just in case
there's an older system around that still returns EAI_ADDRFAMILY.  The
above change would lose on such a system.  Although I don't know if there
are many obsolete IPv6 stacks still around that we need to worry about.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>


More information about the inn-workers mailing list