summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-06 03:20:37 +0000
committerbors <bors@rust-lang.org>2023-05-06 03:20:37 +0000
commitcc8a87be0534f9f3a18f2c83206650f70b0668f2 (patch)
treebd73886c0676180102b006cdcca82554e0ddaaac
parent7f9adf87386c161009501882573dc2c4fab10cd2 (diff)
parent4e1f0e1207de2693885b147356675f73263aaa8b (diff)
downloadrust-libc-cc8a87be0534f9f3a18f2c83206650f70b0668f2.tar.gz
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 https://github.com/nix-rust/nix/pull/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.
-rw-r--r--libc-test/semver/freebsd.txt1
-rw-r--r--libc-test/semver/openbsd.txt1
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs1
-rw-r--r--src/unix/bsd/netbsdlike/openbsd/mod.rs2
4 files changed, 5 insertions, 0 deletions
diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt
index ed9aceecbd..ffb424e8b5 100644
--- a/libc-test/semver/freebsd.txt
+++ b/libc-test/semver/freebsd.txt
@@ -785,6 +785,7 @@ MSG_NBIO
MSG_NOERROR
MSG_NOSIGNAL
MSG_NOTIFICATION
+MSG_WAITFORONE
NANOSECOND
NETGRAPHDISC
NET_RT_DUMP
diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt
index 090311982c..bcd65e09e5 100644
--- a/libc-test/semver/openbsd.txt
+++ b/libc-test/semver/openbsd.txt
@@ -527,6 +527,7 @@ MSG_CMSG_CLOEXEC
MSG_DONTWAIT
MSG_MCAST
MSG_NOSIGNAL
+MSG_WAITFORONE
MNT_LAZY
MNT_NOWAIT
MNT_WAIT
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 01a3bf9db8..c453e7c9b1 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -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;
diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs
index 8099bad1d1..9e9de2e120 100644
--- a/src/unix/bsd/netbsdlike/openbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs
@@ -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;