Skip to content

Commit

Permalink
build: upgrade windows-sys 0.52 → 0.59
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Jan 22, 2025
1 parent 21a13f9 commit 0f123e3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ members = [

[workspace.metadata.spellcheck]
config = "spellcheck.toml"


[patch.crates-io]
# TODO: Consume a release of `mio` that contains <https://github.com/tokio-rs/mio/pull/1857>.
mio = { git = "https://github.com/erichdongubler-contrib/mio", rev = "1ef9c035f9c147621a6aa1d7b80a14d7acb09555" }
# TODO: Consume a release of `socket2` that contains <https://github.com/rust-lang/socket2/pull/545>.
socket2 = { git = "https://github.com/erichdongubler-contrib/socket2", rev = "d4ed5f73ddb051ac700e1b7ee66a72905a86a05e" }
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ once_cell = "1.5.2"
rand = "0.8.3"

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

[[example]]
name = "chat"
Expand Down
2 changes: 1 addition & 1 deletion tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ libc = { version = "0.2.168" }
nix = { version = "0.29.0", default-features = false, features = ["aio", "fs", "socket"] }

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.52"
version = "0.59"
optional = true

[target.'cfg(windows)'.dev-dependencies.windows-sys]
Expand Down
3 changes: 2 additions & 1 deletion tokio/src/net/windows/named_pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::ffi::OsStr;
use std::io::{self, Read, Write};
use std::pin::Pin;
use std::ptr;
use std::ptr::null_mut;
use std::task::{Context, Poll};

use crate::io::{AsyncRead, AsyncWrite, Interest, PollEvented, ReadBuf, Ready};
Expand Down Expand Up @@ -2556,7 +2557,7 @@ impl ClientOptions {
attrs as *mut _,
windows_sys::OPEN_EXISTING,
self.get_flags(),
0,
null_mut(),
);

if h == windows_sys::INVALID_HANDLE_VALUE {
Expand Down
3 changes: 2 additions & 1 deletion tokio/src/process/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use std::os::windows::prelude::{AsRawHandle, IntoRawHandle, OwnedHandle, RawHand
use std::pin::Pin;
use std::process::Stdio;
use std::process::{Child as StdChild, Command as StdCommand, ExitStatus};
use std::ptr::null_mut;
use std::sync::Arc;
use std::task::{Context, Poll};

Expand Down Expand Up @@ -120,7 +121,7 @@ impl Future for Child {
}
let (tx, rx) = oneshot::channel();
let ptr = Box::into_raw(Box::new(Some(tx)));
let mut wait_object = 0;
let mut wait_object = null_mut();
let rc = unsafe {
RegisterWaitForSingleObject(
&mut wait_object,
Expand Down

0 comments on commit 0f123e3

Please sign in to comment.