We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a84f59 commit 2ae0cf8Copy full SHA for 2ae0cf8
src/lib.rs
@@ -129,7 +129,8 @@ impl SctpStream {
129
130
/// Set `timeout` in seconds for operation `dir` (either receive or send)
131
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 };
+ // 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 };
134
return self.0.setsockopt(libc::SOL_SOCKET, dir.timeout_opt(), &tval);
135
}
136
0 commit comments