1
Fork 0

Revert "socket ancillary data implementation for dragonflybsd."

This commit is contained in:
David CARLIER 2021-12-16 21:32:53 +00:00 committed by GitHub
parent 1d01550f7e
commit 78a3078c3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 92 deletions

View file

@ -408,12 +408,12 @@ impl Socket {
Ok(raw != 0)
}
#[cfg(any(target_os = "android", target_os = "linux", target_os = "dragonfly",))]
#[cfg(any(target_os = "android", target_os = "linux",))]
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", target_os = "dragonfly",))]
#[cfg(any(target_os = "android", target_os = "linux",))]
pub fn passcred(&self) -> io::Result<bool> {
let passcred: libc::c_int = getsockopt(self, libc::SOL_SOCKET, libc::SO_PASSCRED)?;
Ok(passcred != 0)