From e68887e67cc6b7bb4ea5113a40eaa4c0831bda13 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 5 Dec 2021 13:36:06 +0000 Subject: socket ancillary data implementation for dragonflybsd. --- library/std/src/sys/unix/net.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'library/std/src/sys') diff --git a/library/std/src/sys/unix/net.rs b/library/std/src/sys/unix/net.rs index a82a0172126..15d0dbe07fe 100644 --- a/library/std/src/sys/unix/net.rs +++ b/library/std/src/sys/unix/net.rs @@ -408,12 +408,12 @@ impl Socket { Ok(raw != 0) } - #[cfg(any(target_os = "android", target_os = "linux",))] + #[cfg(any(target_os = "android", target_os = "linux", target_os = "dragonfly",))] pub fn set_passcred(&self, passcred: bool) -> io::Result<()> { setsockopt(self, libc::SOL_SOCKET, libc::SO_PASSCRED, passcred as libc::c_int) } - #[cfg(any(target_os = "android", target_os = "linux",))] + #[cfg(any(target_os = "android", target_os = "linux", target_os = "dragonfly",))] pub fn passcred(&self) -> io::Result { let passcred: libc::c_int = getsockopt(self, libc::SOL_SOCKET, libc::SO_PASSCRED)?; Ok(passcred != 0) -- cgit 1.4.1-3-g733a5