diff options
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/socket/mod.rs | 7 | ||||
-rw-r--r-- | src/sys/socket/sockopt.rs | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 2102c1ce..bf2e3308 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -801,13 +801,6 @@ pub fn send(fd: RawFd, buf: &[u8], flags: MsgFlags) -> Result<usize> { } #[repr(C)] -#[derive(Clone, Copy, Debug)] -pub struct linger { - pub l_onoff: c_int, - pub l_linger: c_int -} - -#[repr(C)] #[derive(Clone, Copy, PartialEq, Eq, Debug)] pub struct ucred { pid: pid_t, diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs index 4741ec66..fa8d71e2 100644 --- a/src/sys/socket/sockopt.rs +++ b/src/sys/socket/sockopt.rs @@ -132,7 +132,7 @@ macro_rules! sockopt_impl { sockopt_impl!(Both, ReuseAddr, libc::SOL_SOCKET, libc::SO_REUSEADDR, bool); sockopt_impl!(Both, ReusePort, libc::SOL_SOCKET, libc::SO_REUSEPORT, bool); sockopt_impl!(Both, TcpNoDelay, libc::IPPROTO_TCP, libc::TCP_NODELAY, bool); -sockopt_impl!(Both, Linger, libc::SOL_SOCKET, libc::SO_LINGER, super::linger); +sockopt_impl!(Both, Linger, libc::SOL_SOCKET, libc::SO_LINGER, libc::linger); sockopt_impl!(SetOnly, IpAddMembership, libc::IPPROTO_IP, libc::IP_ADD_MEMBERSHIP, super::ip_mreq); sockopt_impl!(SetOnly, IpDropMembership, libc::IPPROTO_IP, libc::IP_DROP_MEMBERSHIP, super::ip_mreq); #[cfg(not(any(target_os = "dragonfly", target_os = "freebsd", target_os = "ios", target_os = "macos", target_os = "netbsd", target_os = "openbsd")))] |