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 to freebsd and openbsd #3224

Merged
merged 2 commits into from May 6, 2023

Conversation

stevenengler
Copy link
Contributor

@stevenengler stevenengler commented Apr 25, 2023

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

I got the values from:

This flag is also supposedly supported on solaris, but I don't know how to find the value. If anyone knows what it is, I'll add it to the PR.

@rustbot
Copy link
Collaborator

rustbot commented Apr 25, 2023

r? @JohnTitor

(rustbot has picked a reviewer for you, use r? to override)

@rustbot
Copy link
Collaborator

rustbot commented Apr 25, 2023

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Some changes occurred in OpenBSD module

cc @semarie

Copy link
Contributor

@pfmooney pfmooney left a comment

Choose a reason for hiding this comment

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

As noted, this constant should not be defined for illumos.

@@ -33,6 +33,8 @@ pub const TCP_KEEPCNT: ::c_int = 35;
pub const TCP_KEEPINTVL: ::c_int = 36;
pub const TCP_CONGESTION: ::c_int = 37;

pub const MSG_WAITFORONE: ::c_int = 0x80000;
Copy link
Contributor

Choose a reason for hiding this comment

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

The illumos source contains copies of numerous FreeBSD headers, owing to our use of their bootloader. That is why you found MSG_WAITFORONE in our source tree. That being said, it is not exposed by our libc or its shipped headers. This should not be added here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I'll remove it. Thanks!

@stevenengler stevenengler changed the title Add MSG_WAITFORONE to freebsd, openbsd, and illumos Add MSG_WAITFORONE to freebsd and openbsd Apr 25, 2023
Copy link
Contributor

@semarie semarie left a comment

Choose a reason for hiding this comment

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

LGTM for openbsd part. thanks.

@JohnTitor
Copy link
Member

Thanks for the PR and reviewing! @bors r+

@bors
Copy link
Contributor

bors commented Apr 26, 2023

📌 Commit 4e1f0e1 has been approved by JohnTitor

It is now in the queue for this repository.

bors added a commit 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
Copy link
Contributor

bors commented Apr 26, 2023

⌛ Testing commit 4e1f0e1 with merge 1864c12...

@bors
Copy link
Contributor

bors commented Apr 26, 2023

💔 Test failed - checks-actions

@stevenengler
Copy link
Contributor Author

Not sure I'll have permission for this: @bors retry

@bors
Copy link
Contributor

bors commented Apr 28, 2023

@stevenengler: 🔑 Insufficient privileges: not in try users

@JohnTitor
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented May 5, 2023

⌛ Testing commit 4e1f0e1 with merge feaabb4...

bors added a commit 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
Copy link
Contributor

bors commented May 5, 2023

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

@bors retry

@bors
Copy link
Contributor

bors commented May 6, 2023

⌛ Testing commit 4e1f0e1 with merge cc8a87b...

@bors
Copy link
Contributor

bors commented May 6, 2023

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing cc8a87b to master...

1 similar comment
@bors
Copy link
Contributor

bors commented May 6, 2023

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing cc8a87b to master...

@bors
Copy link
Contributor

bors commented May 6, 2023

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

@bors bors merged commit cc8a87b into rust-lang:master May 6, 2023
11 checks passed
@stevenengler stevenengler deleted the wait-for-one branch August 21, 2023 18:31
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.

None yet

6 participants