From 0dba9045ef0561f3f73d6de88b25cbd147771d59 Mon Sep 17 00:00:00 2001 From: Steven Engler Date: Tue, 14 Mar 2023 23:25:02 -0400 Subject: [PATCH] Added `MSG_WAITFORONE` flag --- src/sys/socket/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 00c905608a..a5dc2cee15 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -365,6 +365,15 @@ libc_bitflags! { target_os = "solaris"))] #[cfg_attr(docsrs, doc(cfg(all())))] MSG_NOSIGNAL; + /// Turns on [`MSG_DONTWAIT`] after the first message has been received (only for + /// `recvmmsg()`). + #[cfg(any(target_os = "android", + target_os = "fuchsia", + target_os = "linux", + target_os = "netbsd", + target_os = "solaris"))] + #[cfg_attr(docsrs, doc(cfg(all())))] + MSG_WAITFORONE; } }