From: Mark Andrews Date: Mon, 6 Mar 2006 02:27:35 +0000 (+0000) Subject: 2002 [bug] libbind: tighten the constraints on when X-Git-Tag: v9.3.3b1~47 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=873d729387094c604a778693ea0ad23fa1925830;p=thirdparty%2Fbind9.git 2002 [bug] libbind: tighten the constraints on when struct addrinfo._ai_pad exists. [RT #15783] --- diff --git a/CHANGES b/CHANGES index a232d61557c..a9d405e1828 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,7 @@ -2000. [bug] memmove()/strtol() fix was incomplete. [#RT 15812] +2002 [bug] libbind: tighten the constraints on when + struct addrinfo._ai_pad exists. [RT #15783] + +2000. [bug] memmove()/strtol() fix was incomplete. [RT #15812] 1998. [bug] Restrict handling of fifos as sockets to just SunOS. This allows named to connect to entropy gathering diff --git a/lib/bind/include/netdb.h b/lib/bind/include/netdb.h index 48a382941c7..2bf2e348654 100644 --- a/lib/bind/include/netdb.h +++ b/lib/bind/include/netdb.h @@ -86,7 +86,7 @@ /* * @(#)netdb.h 8.1 (Berkeley) 6/2/93 - * $Id: netdb.h,v 1.12.2.1.4.5 2004/11/30 01:15:42 marka Exp $ + * $Id: netdb.h,v 1.12.2.1.4.6 2006/03/06 02:27:35 marka Exp $ */ #ifndef _NETDB_H_ @@ -175,7 +175,7 @@ struct addrinfo { int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ #if defined(sun) && defined(_SOCKLEN_T) -#ifdef __sparc9 +#ifdef __sparcv9 int _ai_pad; #endif socklen_t ai_addrlen; diff --git a/lib/bind/irs/getaddrinfo.c b/lib/bind/irs/getaddrinfo.c index 4f741a8e7de..d80f298bf26 100644 --- a/lib/bind/irs/getaddrinfo.c +++ b/lib/bind/irs/getaddrinfo.c @@ -332,7 +332,7 @@ getaddrinfo(hostname, servname, hints, res) pai->ai_family = PF_UNSPEC; pai->ai_socktype = ANY; pai->ai_protocol = ANY; -#ifdef __sparcv9 +#if defined(sun) && defined(_SOCKLEN_T) && defined(__sparcv9) /* * clear _ai_pad to preserve binary * compatibility with previously compiled 64-bit @@ -340,7 +340,7 @@ getaddrinfo(hostname, servname, hints, res) * guaranteeing the upper 32-bits are empty. */ pai->_ai_pad = 0; -#endif /* __sparcv9 */ +#endif pai->ai_addrlen = 0; pai->ai_canonname = NULL; pai->ai_addr = NULL; @@ -365,7 +365,7 @@ getaddrinfo(hostname, servname, hints, res) } memcpy(pai, hints, sizeof(*pai)); -#ifdef __sparcv9 +#if defined(sun) && defined(_SOCKLEN_T) && defined(__sparcv9) /* * We need to clear _ai_pad to preserve binary * compatibility. See prior comment.