mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
fix non-windows build
This commit is contained in:
1 parent
4d9804f188
commit
8d2c6807d2
1 file changed
+1
-2
@@ -2182,8 +2182,6 @@ mod _socket {
|
||||
))]
|
||||
#[pyfunction]
|
||||
fn if_nameindex(vm: &VirtualMachine) -> PyResult<Vec<PyObjectRef>> {
|
||||
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| {
|
||||
|
||||
Reference in new issue
Block a user