@@ -3,7 +3,7 @@ use super::hermit_abi::{
33 self , DT_DIR , DT_LNK , DT_REG , DT_UNKNOWN , O_APPEND , O_CREAT , O_DIRECTORY , O_EXCL , O_RDONLY ,
44 O_RDWR , O_TRUNC , O_WRONLY , S_IFDIR , S_IFLNK , S_IFMT , S_IFREG , dirent64, stat as stat_struct,
55} ;
6- use crate :: ffi:: { CStr , OsStr , OsString } ;
6+ use crate :: ffi:: { CStr , OsStr , OsString , c_char } ;
77use crate :: io:: { self , BorrowedCursor , Error , ErrorKind , IoSlice , IoSliceMut , SeekFrom } ;
88use crate :: os:: hermit:: ffi:: OsStringExt ;
99use crate :: os:: hermit:: io:: { AsFd , AsRawFd , BorrowedFd , FromRawFd , IntoRawFd , RawFd } ;
@@ -204,7 +204,7 @@ impl Iterator for ReadDir {
204204 // the size of dirent64. The file name is always a C string and terminated by `\0`.
205205 // Consequently, we are able to ignore the last byte.
206206 let name_bytes =
207- unsafe { CStr :: from_ptr ( & dir. d_name as * const _ as * const i8 ) . to_bytes ( ) } ;
207+ unsafe { CStr :: from_ptr ( & dir. d_name as * const _ as * const c_char ) . to_bytes ( ) } ;
208208 let entry = DirEntry {
209209 root : self . inner . root . clone ( ) ,
210210 ino : dir. d_ino ,
@@ -445,7 +445,7 @@ impl DirBuilder {
445445
446446 pub fn mkdir ( & self , path : & Path ) -> io:: Result < ( ) > {
447447 run_path_with_cstr ( path, & |path| {
448- cvt ( unsafe { hermit_abi:: mkdir ( path. as_ptr ( ) , self . mode . into ( ) ) } ) . map ( |_| ( ) )
448+ cvt ( unsafe { hermit_abi:: mkdir ( path. as_ptr ( ) . cast ( ) , self . mode . into ( ) ) } ) . map ( |_| ( ) )
449449 } )
450450 }
451451
0 commit comments