Skip to content

Commit 6fdab08

Browse files
build: upgrade windows-sys 0.52 → 0.59
1 parent 2440d11 commit 6fdab08

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [
3131
'cfg(tokio_unstable)',
3232
'cfg(tokio_uring)',
3333
] }
34+
35+
[patch.crates-io]
36+
# TODO: Consume a release of `socket2` that contains <https://github.com/rust-lang/socket2/pull/545>.
37+
socket2 = { git = "https://github.com/erichdongubler-contrib/socket2", rev = "d4ed5f73ddb051ac700e1b7ee66a72905a86a05e" }

examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ httpdate = "1.0"
2525
once_cell = "1.5.2"
2626

2727
[target.'cfg(windows)'.dev-dependencies.windows-sys]
28-
version = "0.52"
28+
version = "0.59"
2929

3030
[[example]]
3131
name = "chat"

tokio/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pin-project-lite = "0.2.11"
9292

9393
# Everything else is optional...
9494
bytes = { version = "1.2.1", optional = true }
95-
mio = { version = "1.0.1", optional = true, default-features = false }
95+
mio = { version = "1.0.4", optional = true, default-features = false }
9696
parking_lot = { version = "0.12.0", optional = true }
9797

9898
[target.'cfg(not(target_family = "wasm"))'.dependencies]
@@ -106,7 +106,7 @@ tracing = { version = "0.1.29", default-features = false, features = ["std"], op
106106
[target.'cfg(all(tokio_uring, target_os = "linux"))'.dependencies]
107107
io-uring = { version = "0.7.6", default-features = false }
108108
libc = { version = "0.2.168" }
109-
mio = { version = "1.0.1", default-features = false, features = ["os-poll", "os-ext"] }
109+
mio = { version = "1.0.4", default-features = false, features = ["os-poll", "os-ext"] }
110110
slab = "0.4.9"
111111

112112
# Currently unstable. The API exposed by these features may be broken at any time.
@@ -123,11 +123,11 @@ libc = { version = "0.2.168" }
123123
nix = { version = "0.29.0", default-features = false, features = ["aio", "fs", "socket"] }
124124

125125
[target.'cfg(windows)'.dependencies.windows-sys]
126-
version = "0.52"
126+
version = "0.59"
127127
optional = true
128128

129129
[target.'cfg(windows)'.dev-dependencies.windows-sys]
130-
version = "0.52"
130+
version = "0.59"
131131
features = [
132132
"Win32_Foundation",
133133
"Win32_Security_Authorization",

tokio/src/net/windows/named_pipe.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::ffi::OsStr;
77
use std::io::{self, Read, Write};
88
use std::pin::Pin;
99
use std::ptr;
10+
use std::ptr::null_mut;
1011
use std::task::{Context, Poll};
1112

1213
use crate::io::{AsyncRead, AsyncWrite, Interest, PollEvented, ReadBuf, Ready};
@@ -2556,7 +2557,7 @@ impl ClientOptions {
25562557
attrs as *mut _,
25572558
windows_sys::OPEN_EXISTING,
25582559
self.get_flags(),
2559-
0,
2560+
null_mut(),
25602561
);
25612562

25622563
if h == windows_sys::INVALID_HANDLE_VALUE {

tokio/src/process/windows.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use std::os::windows::prelude::{AsRawHandle, IntoRawHandle, OwnedHandle, RawHand
2828
use std::pin::Pin;
2929
use std::process::Stdio;
3030
use std::process::{Child as StdChild, ExitStatus};
31+
use std::ptr::null_mut;
3132
use std::sync::Arc;
3233
use std::task::{Context, Poll};
3334

@@ -119,7 +120,7 @@ impl Future for Child {
119120
}
120121
let (tx, rx) = oneshot::channel();
121122
let ptr = Box::into_raw(Box::new(Some(tx)));
122-
let mut wait_object = 0;
123+
let mut wait_object = null_mut();
123124
let rc = unsafe {
124125
RegisterWaitForSingleObject(
125126
&mut wait_object,

0 commit comments

Comments
 (0)