Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: upgrade windows-sys 0.52 β†’ 0.59 #7117

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading