After some discussion with the folks at ISC, it turns out that the _ai_pad
part of the structure was a hack to maintain binary compatibility with Sun binaries, and my understanding is that it's not needed generally on sparc systems running other operating systems. Therefore, hide this code behind the same set of tests as in lib/bind/include/netdb.h. This file is being imported on the vendor branch because a similar change (or change with similar effect) will be in the next version of BIND 9. This change will not affect other platforms in any way.
This commit is contained in:
parent
a00aca3467
commit
b824835191
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/bind9/dist/; revision=154032
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user