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

Horizon OS Nintendo 3DS - Fixed size of sockaddr_in #2725

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

Meziu
Copy link
Contributor

@Meziu Meziu commented Mar 15, 2022

The original API for the platform included these zeroed bytes at the end of the sockaddr_in struct, but the socket address calls (like getsockname) only write 8 bytes inside sockaddr_storage, making checks like the one in https://github.com/rust-lang/rust/blob/95561b336cf82a8250176eb3c61ea61c90e75d47/library/std/src/sys_common/net.rs#L109 faulty.

Since sockaddr_in is a struct not used in internal functionality, it shouldn't be a problem to just get rid of them.

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@Amanieu
Copy link
Member

Amanieu commented Mar 15, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Mar 15, 2022

📌 Commit 8c60c9a has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Mar 15, 2022

⌛ Testing commit 8c60c9a with merge 9468c85...

bors added a commit that referenced this pull request Mar 15, 2022
Horizon OS Nintendo 3DS - Fixed size of sockaddr_in

The original API for the platform included these zeroed bytes at the end of the `sockaddr_in` struct, but the socket address calls (like `getsockname`) only write 8 bytes inside `sockaddr_storage`, making checks like the one in https://github.com/rust-lang/rust/blob/95561b336cf82a8250176eb3c61ea61c90e75d47/library/std/src/sys_common/net.rs#L109 faulty.

Since `sockaddr_in` is a struct *not* used in internal functionality, it shouldn't be a problem to just get rid of them.
@bors
Copy link
Contributor

bors commented Mar 15, 2022

💔 Test failed - checks-actions

@Amanieu
Copy link
Member

Amanieu commented Mar 15, 2022

@bors retry

@bors
Copy link
Contributor

bors commented Mar 15, 2022

⌛ Testing commit 8c60c9a with merge ea3ab53...

@bors
Copy link
Contributor

bors commented Mar 15, 2022

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: Amanieu
Pushing ea3ab53 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants