struct addrinfo needs padding on Solaris/SPARC

64-bit Solaris/SPARC has a 4-byte pad before ai_addrlen for historical
reasons (ai_addrlen used to be defined as a size_t, which is 4 bytes in
ILP32 and 8 in LP64, but was converted to a 4-byte socklen_t in Solaris
10, which necessitated padding for (more or less) binary compatibility).
This commit is contained in:
Danek Duvall 2017-08-06 10:42:39 -07:00
parent 6c0ff9e7ca
commit 1375070196

View File

@ -208,6 +208,8 @@ s! {
pub ai_family: ::c_int,
pub ai_socktype: ::c_int,
pub ai_protocol: ::c_int,
#[cfg(target_arch = "sparc64")]
__sparcv9_pad: ::c_int,
pub ai_addrlen: ::socklen_t,
pub ai_canonname: *mut ::c_char,
pub ai_addr: *mut ::sockaddr,