From e9e4571eb89a14f83b0f1742a6e47cb3955dc57a Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Wed, 27 Apr 2022 17:04:57 +0200 Subject: [PATCH] Use SIO_* constants defined in windows-sys --- src/sys/windows/selector.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/sys/windows/selector.rs b/src/sys/windows/selector.rs index 0ac259157..9f3cf68dd 100644 --- a/src/sys/windows/selector.rs +++ b/src/sys/windows/selector.rs @@ -536,15 +536,11 @@ cfg_io_source! { use std::mem::size_of; use std::ptr::null_mut; - use windows_sys::Win32::Networking::WinSock::{WSAGetLastError, SOCKET_ERROR, WSAIoctl, IOC_OUT, IOC_WS2}; - - // These constants were part of winapi but are not yet in windows-sys - // - // https://github.com/microsoft/win32metadata/issues/844 - const SIO_BSP_HANDLE: u32 = IOC_OUT | IOC_WS2 | 27; // 1_207_959_579u32 - const SIO_BSP_HANDLE_SELECT: u32 = IOC_OUT | IOC_WS2 | 28; // 1_207_959_580u32 - const SIO_BSP_HANDLE_POLL: u32 = IOC_OUT | IOC_WS2 | 29; // 1_207_959_581u32 - const SIO_BASE_HANDLE: u32 = IOC_OUT | IOC_WS2 | 34; // 1_207_959_586u32 + use windows_sys::Win32::Networking::WinSock::{ + WSAGetLastError, WSAIoctl, SIO_BASE_HANDLE, SIO_BSP_HANDLE, + SIO_BSP_HANDLE_POLL, SIO_BSP_HANDLE_SELECT, SOCKET_ERROR, + }; + impl SelectorInner { fn register(