From 589cc50b079a6371508639ac00021fb9509f965b Mon Sep 17 00:00:00 2001 From: Greg V Date: Fri, 5 Jan 2018 01:11:11 +0300 Subject: [PATCH] Expose MSG_CMSG_CLOEXEC on *BSD --- CHANGELOG.md | 2 ++ src/sys/socket/mod.rs | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23996360ea..a520ebb8ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ([#825](https://github.com/nix-rust/nix/pull/825)) - Exposed `termios::cfmakesane` on FreeBSD. ([#825](https://github.com/nix-rust/nix/pull/825)) +- Exposed `MSG_CMSG_CLOEXEC` on *BSD. + ([#825](https://github.com/nix-rust/nix/pull/825)) ### Changed - Exposed the `mqueue` module for all supported operating systems. diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 7c62c7392c..dae4e811d1 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -163,7 +163,12 @@ libc_bitflags!{ /// [open(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html). /// /// Only used in [`recvmsg`](fn.recvmsg.html) function. - #[cfg(any(target_os = "linux", target_os = "android"))] + #[cfg(any(target_os = "android", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "linux", + target_os = "netbsd", + target_os = "openbsd"))] MSG_CMSG_CLOEXEC; } }