Skip to content

Commit cc8a87b

Browse files
committed
Auto merge of #3224 - stevenengler:wait-for-one, r=JohnTitor
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.
2 parents 7f9adf8 + 4e1f0e1 commit cc8a87b

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

libc-test/semver/freebsd.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,7 @@ MSG_NBIO
785785
MSG_NOERROR
786786
MSG_NOSIGNAL
787787
MSG_NOTIFICATION
788+
MSG_WAITFORONE
788789
NANOSECOND
789790
NETGRAPHDISC
790791
NET_RT_DUMP

libc-test/semver/openbsd.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ MSG_CMSG_CLOEXEC
527527
MSG_DONTWAIT
528528
MSG_MCAST
529529
MSG_NOSIGNAL
530+
MSG_WAITFORONE
530531
MNT_LAZY
531532
MNT_NOWAIT
532533
MNT_WAIT

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3696,6 +3696,7 @@ pub const MSG_NBIO: ::c_int = 0x00004000;
36963696
pub const MSG_COMPAT: ::c_int = 0x00008000;
36973697
pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000;
36983698
pub const MSG_NOSIGNAL: ::c_int = 0x20000;
3699+
pub const MSG_WAITFORONE: ::c_int = 0x00080000;
36993700

37003701
// utmpx entry types
37013702
pub const EMPTY: ::c_short = 0;

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,8 @@ pub const IP_RECVIF: ::c_int = 30;
10731073
pub const TCP_MD5SIG: ::c_int = 0x04;
10741074
pub const TCP_NOPUSH: ::c_int = 0x10;
10751075

1076+
pub const MSG_WAITFORONE: ::c_int = 0x1000;
1077+
10761078
pub const AF_ECMA: ::c_int = 8;
10771079
pub const AF_ROUTE: ::c_int = 17;
10781080
pub const AF_ENCAP: ::c_int = 28;

0 commit comments

Comments
 (0)