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

Backport patches to 0.38 #1161

Merged
merged 3 commits into from
Sep 11, 2024
Merged

Backport patches to 0.38 #1161

merged 3 commits into from
Sep 11, 2024

Conversation

sunfishcode
Copy link
Member

Backport three recent patches to 0.38.

* Fix `recv_uninit` to handle the `TRUNC` flag.

With the `TRUNC` flag, `recv` returns the untruncated length, which may
be longer than the provided buffer. Fix `recv_uninit` and
`recvfrom_uninit` to handle this case.

This mean that `recv_uninit` and `recvfrom_uninit` are unable to return
the full untruncated length returned by `recv` with the `TRUNC` flag,
however it appears that fixing that may require API changes.

Fixes #1153.

* Add comments mentioning alternatives.
* Update POSIX reference URLs to 1003.1-2024.

Update POSIX reference URLs from pointing to Issue 7, 1003.1-2017, to
now point to the new Issue 8, 1003.1-2024.

* Move some unit tests into `mod tests`.

This moves toward the popular idiom of putting tests in `mod tests`
with `#[cfg(test)]`, and also works around Rust nightly warning about
undocumented constants in the expansion of `#[test]`.
@sunfishcode sunfishcode merged commit a0f9680 into 0.38 Sep 11, 2024
42 of 43 checks passed
@sunfishcode sunfishcode deleted the 0.38-updates branch September 11, 2024 16:37
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.

1 participant