Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 23, 2022

Conversation

rtzoeller
Copy link
Collaborator

Resolves #1246.

@@ -330,6 +330,11 @@ impl InetAddr {
match *std {
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
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
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