From e00482ff79a41fec47048fe76c77c91f7c671adb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 14:45:53 +0000 Subject: [PATCH 1/2] Update windows-sys requirement from 0.48 to 0.52 Updates the requirements on [windows-sys](https://github.com/microsoft/windows-rs) to permit the latest version. - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/compare/0.48.0...0.52.0) --- updated-dependencies: - dependency-name: windows-sys dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c2c9790..4ec82ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ concurrent-queue = "2.2.0" pin-project-lite = "0.2.9" [target.'cfg(windows)'.dependencies.windows-sys] -version = "0.48" +version = "0.52" features = [ "Win32_Foundation", "Win32_Networking_WinSock", From 8df247358b2ef8de8dffcb2eb1bf4584bfe9d48d Mon Sep 17 00:00:00 2001 From: John Nunley Date: Fri, 24 Nov 2023 07:38:33 -0800 Subject: [PATCH 2/2] Correct windows-sys imports Signed-off-by: John Nunley --- Cargo.toml | 2 ++ src/iocp/afd.rs | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4ec82ff..2c0a1f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,8 @@ pin-project-lite = "0.2.9" [target.'cfg(windows)'.dependencies.windows-sys] version = "0.52" features = [ + "Wdk_Foundation", + "Wdk_Storage_FileSystem", "Win32_Foundation", "Win32_Networking_WinSock", "Win32_Security", diff --git a/src/iocp/afd.rs b/src/iocp/afd.rs index 58783e5..a4b58ba 100644 --- a/src/iocp/afd.rs +++ b/src/iocp/afd.rs @@ -14,6 +14,8 @@ use std::ptr; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Once; +use windows_sys::Wdk::Foundation::OBJECT_ATTRIBUTES; +use windows_sys::Wdk::Storage::FileSystem::FILE_OPEN; use windows_sys::Win32::Foundation::{ CloseHandle, HANDLE, HMODULE, NTSTATUS, STATUS_NOT_FOUND, STATUS_PENDING, STATUS_SUCCESS, UNICODE_STRING, @@ -21,11 +23,9 @@ use windows_sys::Win32::Foundation::{ use windows_sys::Win32::Networking::WinSock::{ WSAIoctl, SIO_BASE_HANDLE, SIO_BSP_HANDLE_POLL, SOCKET_ERROR, }; -use windows_sys::Win32::Storage::FileSystem::{ - FILE_OPEN, FILE_SHARE_READ, FILE_SHARE_WRITE, SYNCHRONIZE, -}; +use windows_sys::Win32::Storage::FileSystem::{FILE_SHARE_READ, FILE_SHARE_WRITE, SYNCHRONIZE}; use windows_sys::Win32::System::LibraryLoader::{GetModuleHandleW, GetProcAddress}; -use windows_sys::Win32::System::WindowsProgramming::{IO_STATUS_BLOCK, OBJECT_ATTRIBUTES}; +use windows_sys::Win32::System::IO::IO_STATUS_BLOCK; #[derive(Default)] #[repr(C)]