Skip to content

Commit 733ddf1

Browse files
authored
Added MSG_WAITFORONE flag to MsgFlags (#2014)
1 parent 0e0e181 commit 733ddf1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2929
- Removed `flock` from `::nix::fcntl` on Solaris. ([#2082](https://github.com/nix-rust/nix/pull/2082))
3030
- Use I/O safety with `copy_file_range`, and expose it on FreeBSD.
3131
(#[1906](https://github.com/nix-rust/nix/pull/1906))
32+
- Added `MSG_WAITFORONE` to `MsgFlags` on Android, Fuchsia, Linux, NetBSD,
33+
FreeBSD, OpenBSD, and Solaris.
34+
([#2014](https://github.com/nix-rust/nix/pull/2014))
3235

3336
### Changed
3437

src/sys/socket/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,17 @@ libc_bitflags! {
374374
target_os = "solaris"))]
375375
#[cfg_attr(docsrs, doc(cfg(all())))]
376376
MSG_NOSIGNAL;
377+
/// Turns on [`MSG_DONTWAIT`] after the first message has been received (only for
378+
/// `recvmmsg()`).
379+
#[cfg(any(target_os = "android",
380+
target_os = "fuchsia",
381+
target_os = "linux",
382+
target_os = "netbsd",
383+
target_os = "freebsd",
384+
target_os = "openbsd",
385+
target_os = "solaris"))]
386+
#[cfg_attr(docsrs, doc(cfg(all())))]
387+
MSG_WAITFORONE;
377388
}
378389
}
379390

0 commit comments

Comments
 (0)