Skip to content

Commit 2ae0cf8

Browse files
author
pierresy
committed
Fixed linux build issue
1 parent 2a84f59 commit 2ae0cf8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ impl SctpStream {
129129

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

0 commit comments

Comments
 (0)