Skip to content

Commit 3924cb0

Browse files
committed
std::rt::io: Fix file I/O on Win32
It was broken on win32 because of header inconsistency.
1 parent 323e8f0 commit 3924cb0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/libstd/rt/uv/uvll.rs

+9
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,20 @@ pub mod errors {
6767
pub static EPIPE: c_int = -libc::EPIPE;
6868
}
6969

70+
// see libuv/include/uv-unix.h
71+
#[cfg(unix)]
7072
pub struct uv_buf_t {
7173
base: *u8,
7274
len: libc::size_t,
7375
}
7476

77+
// see libuv/include/uv-win.h
78+
#[cfg(windows)]
79+
pub struct uv_buf_t {
80+
len: u32,
81+
base: *u8,
82+
}
83+
7584
pub type uv_handle_t = c_void;
7685
pub type uv_loop_t = c_void;
7786
pub type uv_idle_t = c_void;

0 commit comments

Comments
 (0)