Skip to content

InetAddr::from_std should set sin_len/sin6_len on the BSDs#1642

Merged
bors[bot] merged 1 commit intonix-rust:masterfrom
rtzoeller:sockaddr_in.sin_len
Jan 23, 2022
Merged

InetAddr::from_std should set sin_len/sin6_len on the BSDs#1642
bors[bot] merged 1 commit intonix-rust:masterfrom
rtzoeller:sockaddr_in.sin_len

Conversation

@rtzoeller
Copy link
Copy Markdown
Collaborator

Resolves #1246.

Comment thread src/sys/socket/addr.rs
net::SocketAddr::V4(ref addr) => {
InetAddr::V4(libc::sockaddr_in {
#[cfg(any(target_os = "dragonfly", target_os = "freebsd",
target_os = "haiku", target_os = "hermit",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pulled the list of platforms which define these from rust-lang/libc. Although nix doesn't support Haiku or Hermit, there are other cfg blocks which reference them in nix, so I included them here.

I omitted newlib and VxWorks, as nix doesn't currently have any cfg blocks for them.

@asomers
Copy link
Copy Markdown
Member

asomers commented Jan 23, 2022

bors r+

@bors bors bot merged commit ae2b7b3 into nix-rust:master Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InetAddr::from_std fails to initialize len fields

2 participants