Skip to content

Commit 2a5b50b

Browse files
committed
Auto merge of rust-lang#714 - dhduvall:master, r=alexcrichton
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). See rust-lang#43649.
2 parents 6c0ff9e + 1375070 commit 2a5b50b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/unix/solaris/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ s! {
208208
pub ai_family: ::c_int,
209209
pub ai_socktype: ::c_int,
210210
pub ai_protocol: ::c_int,
211+
#[cfg(target_arch = "sparc64")]
212+
__sparcv9_pad: ::c_int,
211213
pub ai_addrlen: ::socklen_t,
212214
pub ai_canonname: *mut ::c_char,
213215
pub ai_addr: *mut ::sockaddr,

0 commit comments

Comments
 (0)