File tree Expand file tree Collapse file tree 4 files changed +6
-14
lines changed
Expand file tree Collapse file tree 4 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ num-traits = { workspace = true }
1616
1717[target .'cfg(unix)' .dependencies ]
1818nix = { workspace = true }
19+
20+ [target .'cfg(all(unix, not(target_os = "ios"), not(target_os = "redox")))' .dependencies ]
1921termios = " 0.3.3"
2022
2123[target .'cfg(windows)' .dependencies ]
Original file line number Diff line number Diff line change 11use std:: io;
22
3- #[ cfg( target_os = "wasi" ) ]
4- fn ioctl_request ( request : libc:: c_ulong ) -> libc:: c_int {
5- request as _
6- }
7-
8- #[ cfg( not( target_os = "wasi" ) ) ]
9- fn ioctl_request ( request : libc:: c_ulong ) -> libc:: c_ulong {
10- request
11- }
12-
133pub fn fcntl_int ( fd : i32 , cmd : i32 , arg : i32 ) -> io:: Result < i32 > {
144 let ret = unsafe { libc:: fcntl ( fd, cmd, arg) } ;
155 if ret < 0 {
@@ -37,7 +27,7 @@ pub unsafe fn ioctl_ptr(
3727 request : libc:: c_ulong ,
3828 arg : * mut libc:: c_void ,
3929) -> io:: Result < i32 > {
40- let ret = unsafe { libc:: ioctl ( fd, ioctl_request ( request) , arg) } ;
30+ let ret = unsafe { libc:: ioctl ( fd, request as _ , arg) } ;
4131 if ret < 0 {
4232 Err ( io:: Error :: last_os_error ( ) )
4333 } else {
@@ -46,7 +36,7 @@ pub unsafe fn ioctl_ptr(
4636}
4737
4838pub fn ioctl_int ( fd : i32 , request : libc:: c_ulong , arg : i32 ) -> io:: Result < i32 > {
49- let ret = unsafe { libc:: ioctl ( fd, ioctl_request ( request) , arg) } ;
39+ let ret = unsafe { libc:: ioctl ( fd, request as _ , arg) } ;
5040 if ret < 0 {
5141 Err ( io:: Error :: last_os_error ( ) )
5242 } else {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ mod msvcrt {
88 PyRef , PyResult , VirtualMachine ,
99 builtins:: { PyBytes , PyStrRef } ,
1010 convert:: IntoPyException ,
11- host_env:: { crt_fd, suppress_iph } ,
11+ host_env:: crt_fd,
1212 } ;
1313 use itertools:: Itertools ;
1414 use rustpython_host_env:: msvcrt as host_msvcrt;
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ pub(crate) mod module {
283283 }
284284
285285 fn win32_lchmod ( path : & OsPath , mode : u32 , vm : & VirtualMachine ) -> PyResult < ( ) > {
286- host_nt:: win32_lchmod ( path. as_os_str ( ) , mode, S_IWRITE )
286+ host_nt:: win32_lchmod ( path. path . as_os_str ( ) , mode, S_IWRITE )
287287 . map_err ( |err| OSErrorBuilder :: with_filename ( & err, path. clone ( ) , vm) )
288288 }
289289
You can’t perform that action at this time.
0 commit comments