diff options
Diffstat (limited to 'src/sys/socket.rs')
-rw-r--r-- | src/sys/socket.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sys/socket.rs b/src/sys/socket.rs index 86089f1f..0f4b2874 100644 --- a/src/sys/socket.rs +++ b/src/sys/socket.rs @@ -288,6 +288,12 @@ pub fn connect(sockfd: Fd, addr: &SockAddr) -> SysResult<()> { from_ffi(res) } +#[repr(C)] +pub struct linger { + pub l_onoff: c_int, + pub l_linger: c_int +} + pub fn getsockopt<T>(fd: Fd, level: SockLevel, opt: SockOpt, val: &mut T) -> SysResult<uint> { let mut len = mem::size_of::<T>() as socklen_t; |