Skip to content

Commit

Permalink
haiku: Fix sockaddr_in/sockaddr_in6; Solves #108
Browse files Browse the repository at this point in the history
  • Loading branch information
kallisti5 committed Dec 9, 2020
1 parent 71708b7 commit 6081dff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,18 @@ fn addr2raw_v4(addr: &SocketAddrV4) -> (SocketAddrCRepr, c::socklen_t) {
sin_family: c::AF_INET as c::sa_family_t,
sin_port: addr.port().to_be(),
sin_addr,
#[cfg(not(target_os = "haiku"))]
sin_zero: [0; 8],
#[cfg(target_os = "haiku")]
sin_zero: [0; 24],
#[cfg(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd"
target_os = "openbsd",
target_os = "haiku",
))]
sin_len: 0,
},
Expand Down Expand Up @@ -173,7 +177,8 @@ fn addr2raw_v6(addr: &SocketAddrV6) -> (SocketAddrCRepr, c::socklen_t) {
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd"
target_os = "openbsd",
target_os = "haiku",
))]
sin6_len: 0,
#[cfg(any(target_os = "solaris", target_os = "illumos"))]
Expand Down

0 comments on commit 6081dff

Please sign in to comment.