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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions libc-test/semver/freebsd.txt
Expand Up @@ -785,6 +785,7 @@ MSG_NBIO
MSG_NOERROR
MSG_NOSIGNAL
MSG_NOTIFICATION
MSG_WAITFORONE
NANOSECOND
NETGRAPHDISC
NET_RT_DUMP
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/openbsd.txt
Expand Up @@ -527,6 +527,7 @@ MSG_CMSG_CLOEXEC
MSG_DONTWAIT
MSG_MCAST
MSG_NOSIGNAL
MSG_WAITFORONE
MNT_LAZY
MNT_NOWAIT
MNT_WAIT
Expand Down
1 change: 1 addition & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -3696,6 +3696,7 @@ pub const MSG_NBIO: ::c_int = 0x00004000;
pub const MSG_COMPAT: ::c_int = 0x00008000;
pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000;
pub const MSG_NOSIGNAL: ::c_int = 0x20000;
pub const MSG_WAITFORONE: ::c_int = 0x00080000;

// utmpx entry types
pub const EMPTY: ::c_short = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/netbsdlike/openbsd/mod.rs
Expand Up @@ -1073,6 +1073,8 @@ pub const IP_RECVIF: ::c_int = 30;
pub const TCP_MD5SIG: ::c_int = 0x04;
pub const TCP_NOPUSH: ::c_int = 0x10;

pub const MSG_WAITFORONE: ::c_int = 0x1000;

pub const AF_ECMA: ::c_int = 8;
pub const AF_ROUTE: ::c_int = 17;
pub const AF_ENCAP: ::c_int = 28;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/solarish/illumos.rs
Expand Up @@ -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!


// These constants are correct for 64-bit programs or 32-bit programs that are
// not using large-file mode. If Rust ever supports anything other than 64-bit
// compilation on illumos, this may require adjustment:
Expand Down