Skip to content

Commit a2b06c4

Browse files
Copilotyouknowone
andauthored
fix: repair remaining windows host env regressions
Agent-Logs-Url: https://github.com/RustPython/RustPython/sessions/e08d23a2-d816-46d7-825d-a4efc1b90bd4 Co-authored-by: youknowone <[email protected]>
1 parent 9707aeb commit a2b06c4

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

crates/host_env/src/msvcrt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use alloc::{string::String, vec::Vec};
22
use std::io;
33

4-
use crate::{crt_fd, suppress_iph};
4+
use crate::crt_fd;
55
use windows_sys::Win32::System::Diagnostics::Debug;
66

77
pub const LK_UNLCK: i32 = 0;

crates/host_env/src/nt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use windows_sys::Win32::{
1010
},
1111
};
1212

13+
#[allow(clippy::not_unsafe_ptr_arg_deref)]
1314
pub fn win32_hchmod(handle: HANDLE, mode: u32, write_bit: u32) -> io::Result<()> {
1415
let mut info: FILE_BASIC_INFO = unsafe { core::mem::zeroed() };
1516
let ret = unsafe {

crates/stdlib/src/socket.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2787,13 +2787,13 @@ mod _socket {
27872787
}
27882788
#[cfg(windows)]
27892789
{
2790-
use crate::select;
2790+
use rustpython_host_env::select as host_select;
27912791

27922792
let fd = sock_fileno(sock);
27932793

2794-
let mut reads = select::FdSet::new();
2795-
let mut writes = select::FdSet::new();
2796-
let mut errs = select::FdSet::new();
2794+
let mut reads = host_select::FdSet::new();
2795+
let mut writes = host_select::FdSet::new();
2796+
let mut errs = host_select::FdSet::new();
27972797

27982798
let fd = fd as usize;
27992799
match kind {
@@ -2805,12 +2805,12 @@ mod _socket {
28052805
}
28062806
}
28072807

2808-
let mut interval = interval.map(|dur| select::timeval {
2808+
let mut interval = interval.map(|dur| host_select::timeval {
28092809
tv_sec: dur.as_secs() as _,
28102810
tv_usec: dur.subsec_micros() as _,
28112811
});
28122812

2813-
select::select(
2813+
host_select::select(
28142814
fd as i32 + 1,
28152815
&mut reads,
28162816
&mut writes,

0 commit comments

Comments
 (0)