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

sys::socket fixes for haiku #2242

Merged
merged 1 commit into from
Dec 2, 2023
Merged

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Dec 1, 2023

No description provided.

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

Also, it looks like redox is missing on line 528.

@@ -447,7 +447,7 @@ impl UnixAddr {
cfg_if! {
if #[cfg(any(linux_android,
target_os = "fuchsia",
target_os = "illumos",
solarish,
Copy link
Member

Choose a reason for hiding this comment

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

Why this change? It doesn't match the commit message.

src/sys/socket/addr.rs Show resolved Hide resolved
@@ -2327,7 +2327,10 @@ mod tests {

#[test]
fn from_sockaddr_un_named() {
#[cfg(not(target_os = "haiku"))]
Copy link
Member

Choose a reason for hiding this comment

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

This socket never actually gets constructed. The test just exercises sockaddr type conversions. So why special case it for Haiku?

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

Looks better. But why the illumos -> Solarish change?

@devnexen
Copy link
Contributor Author

devnexen commented Dec 2, 2023

Because it s better using new cfg and solaris was forgotten here.

@asomers
Copy link
Member

asomers commented Dec 2, 2023

Because it s better using new cfg and solaris was forgotten here.

But that's a user-visible change, and you didn't put it in the changelog entry or even in the commit message.

@devnexen
Copy link
Contributor Author

devnexen commented Dec 2, 2023

I updated the commit message but did not do the changelog change indeed..

@@ -0,0 +1,2 @@
Fixed UnixAddr::new for haiku, it did not record the `sun_len` value as needed.
Fixed `sys::socket::addr` for solaris to have the same code path as illumos.
Copy link
Member

Choose a reason for hiding this comment

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

"to have the same code path as illumos" means nothing to end users. Please explain the impact of your change with them in mind.

Copy link
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

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

It looks like the Solaris build is broken in some other ways, too. But no need to fix them all in this PR.

@asomers asomers added this pull request to the merge queue Dec 2, 2023
Merged via the queue into nix-rust:master with commit 2ad5573 Dec 2, 2023
34 checks passed
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.

None yet

2 participants