summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2014-09-03 22:46:48 -0700
committerCarl Lerche <me@carllerche.com>2014-09-03 22:46:48 -0700
commitfce5767bf1f03e4666a77457e481bbf07a3d646d (patch)
tree44b534ba919339dcce8e49c884691a2561f3166a /src/sys
parentcfeed110492cc53da67f99e51f9268567556c428 (diff)
downloadnix-fce5767bf1f03e4666a77457e481bbf07a3d646d.zip
Expose some more C types
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/socket.rs6
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;