From 8d2c6807d28000c8ee3dc4b7d65d86c8f63bcb52 Mon Sep 17 00:00:00 2001 From: Ashwin Naren Date: Mon, 3 Mar 2025 10:50:19 -0800 Subject: [PATCH] fix non-windows build --- stdlib/src/socket.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stdlib/src/socket.rs b/stdlib/src/socket.rs index cfdf4c8a4..b46514eb7 100644 --- a/stdlib/src/socket.rs +++ b/stdlib/src/socket.rs @@ -2182,8 +2182,6 @@ mod _socket { ))] #[pyfunction] fn if_nameindex(vm: &VirtualMachine) -> PyResult> { - use windows_sys::Win32::NetworkManagement::Ndis::NET_LUID_LH; - #[cfg(not(windows))] { let list = nix::net::if_::if_nameindex() @@ -2202,6 +2200,7 @@ mod _socket { #[cfg(windows)] { use std::ptr; + use windows_sys::Win32::NetworkManagement::Ndis::NET_LUID_LH; let table = MibTable::get_raw().map_err(|err| err.into_pyexception(vm))?; let list = table.as_slice().iter().map(|entry| {