Skip to content

Commit

Permalink
Fixed linux build issue
Browse files Browse the repository at this point in the history
pierresy committed Aug 2, 2015
1 parent 2a84f59 commit 2ae0cf8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -129,7 +129,8 @@ impl SctpStream {

/// Set `timeout` in seconds for operation `dir` (either receive or send)
pub fn set_timeout(&self, dir: SoDirection, timeout: i32) -> Result<()> {
let tval = libc::timeval { tv_sec: timeout as libc::c_int, tv_usec: 0 };
// Workaround: Use onf long instead of time_t which does not compile in windows x86_64
let tval = libc::timeval { tv_sec: timeout as libc::c_long, tv_usec: 0 };
return self.0.setsockopt(libc::SOL_SOCKET, dir.timeout_opt(), &tval);
}

0 comments on commit 2ae0cf8

Please sign in to comment.