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

Add MSG_WAITFORONE flag #2014

Merged
merged 1 commit into from Aug 26, 2023
Merged

Conversation

stevenengler
Copy link
Contributor

@stevenengler stevenengler commented Mar 15, 2023

I'm not sure what platforms this is defined on, so I listed the ones that I think it's defined on. Below I've listed why I think it's defined on each platform.

Edit: Removed the flag for freebsd, illumos, and openbsd since it isn't defined in the rust libc library for those platforms. The linux musl failure seems to be unrelated.

Edit 2: Added a changelog entry.

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.

If some definitions are missing from libc, then you should add them there rather than leave them out here. That's a very common thing to do when adding new functionality to Nix.

bors added a commit to rust-lang/libc that referenced this pull request Apr 26, 2023
Add `MSG_WAITFORONE` to freebsd and openbsd

Adds `MSG_WAITFORONE` to freebsd, openbsd, and ~illumos~, as requested in nix-rust/nix#2014.

I got the values from:

- freebsd: http://fxr.watson.org/fxr/source/sys/socket.h#L473
- openbsd: https://github.com/openbsd/src/blob/2852e11abfc574a216ce741308fb0c6968d9617a/sys/sys/socket.h#L512
- illumos: https://github.com/illumos/illumos-gate/blob/717646f7112314de3f464bc0b75f034f009c861e/usr/src/boot/sys/sys/socket.h#L434

This flag is also supposedly supported on [solaris](https://docs.oracle.com/cd/E88353_01/html/E37843/recvmmsg-3c.html), but I don't know how to find the value. If anyone knows what it is, I'll add it to the PR.
bors added a commit to rust-lang/libc that referenced this pull request May 5, 2023
Add `MSG_WAITFORONE` to freebsd and openbsd

Adds `MSG_WAITFORONE` to freebsd, openbsd, and ~illumos~, as requested in nix-rust/nix#2014.

I got the values from:

- freebsd: http://fxr.watson.org/fxr/source/sys/socket.h#L473
- openbsd: https://github.com/openbsd/src/blob/2852e11abfc574a216ce741308fb0c6968d9617a/sys/sys/socket.h#L512
- illumos: https://github.com/illumos/illumos-gate/blob/717646f7112314de3f464bc0b75f034f009c861e/usr/src/boot/sys/sys/socket.h#L434

This flag is also supposedly supported on [solaris](https://docs.oracle.com/cd/E88353_01/html/E37843/recvmmsg-3c.html), but I don't know how to find the value. If anyone knows what it is, I'll add it to the PR.
bors added a commit to rust-lang/libc that referenced this pull request May 6, 2023
Add `MSG_WAITFORONE` to freebsd and openbsd

Adds `MSG_WAITFORONE` to freebsd, openbsd, and ~illumos~, as requested in nix-rust/nix#2014.

I got the values from:

- freebsd: http://fxr.watson.org/fxr/source/sys/socket.h#L473
- openbsd: https://github.com/openbsd/src/blob/2852e11abfc574a216ce741308fb0c6968d9617a/sys/sys/socket.h#L512
- illumos: https://github.com/illumos/illumos-gate/blob/717646f7112314de3f464bc0b75f034f009c861e/usr/src/boot/sys/sys/socket.h#L434

This flag is also supposedly supported on [solaris](https://docs.oracle.com/cd/E88353_01/html/E37843/recvmmsg-3c.html), but I don't know how to find the value. If anyone knows what it is, I'll add it to the PR.
@stevenengler
Copy link
Contributor Author

If some definitions are missing from libc, then you should add them there rather than leave them out here. That's a very common thing to do when adding new functionality to Nix.

I've added it for more platforms in libc, and that change is in the latest libc release.

@stevenengler stevenengler requested a review from asomers May 8, 2023 15:23
@asomers
Copy link
Member

asomers commented May 20, 2023

This PR is still failing because MSG_WAITFORONE isn't defined everywhere. You need to update the libc spec in Cargo.toml. Also, I think you need to rebase to fix the failure in Linux armv7 uclibceabihf

@stevenengler
Copy link
Contributor Author

This is rebased and all tests now pass.

@asomers asomers added this pull request to the merge queue Aug 26, 2023
Merged via the queue into nix-rust:master with commit 733ddf1 Aug 26, 2023
35 checks passed
@stevenengler stevenengler deleted the msg-waitforone branch August 26, 2023 19:21
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