@@ -273,7 +273,7 @@ impl UnixFileDescription for FileHandle {
273
273
274
274
impl < ' tcx > EvalContextExtPrivate < ' tcx > for crate :: MiriInterpCx < ' tcx > { }
275
275
trait EvalContextExtPrivate < ' tcx > : crate :: MiriInterpCxExt < ' tcx > {
276
- fn macos_fbsd_solaris_write_buf (
276
+ fn macos_fbsd_solarish_write_stat_buf (
277
277
& mut self ,
278
278
metadata : FileMetadata ,
279
279
buf_op : & OpTy < ' tcx > ,
@@ -321,9 +321,9 @@ trait EvalContextExtPrivate<'tcx>: crate::MiriInterpCxExt<'tcx> {
321
321
}
322
322
323
323
if matches ! ( & * this. tcx. sess. target. os, "solaris" | "illumos" ) {
324
- // FIXME: write st_fstype field once libc is updated.
325
- // https://github.com/rust-lang/libc/pull/4145
326
- // this.write_int_fields_named(&[(" st_fstype" , 0)], &buf )?;
324
+ let st_fstype = this . project_field_named ( & buf , "st_fstype" ) ? ;
325
+ // This is an array; write 0 into first element so that it encodes the empty string.
326
+ this. write_int ( 0 , & this . project_index ( & st_fstype, 0 ) ? ) ?;
327
327
}
328
328
329
329
interp_ok ( 0 )
@@ -671,7 +671,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
671
671
interp_ok ( Scalar :: from_i32 ( this. try_unwrap_io_result ( result) ?) )
672
672
}
673
673
674
- fn macos_fbsd_solaris_stat (
674
+ fn macos_fbsd_solarish_stat (
675
675
& mut self ,
676
676
path_op : & OpTy < ' tcx > ,
677
677
buf_op : & OpTy < ' tcx > ,
@@ -697,11 +697,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
697
697
Err ( err) => return this. set_last_error_and_return_i32 ( err) ,
698
698
} ;
699
699
700
- interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solaris_write_buf ( metadata, buf_op) ?) )
700
+ interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solarish_write_stat_buf ( metadata, buf_op) ?) )
701
701
}
702
702
703
703
// `lstat` is used to get symlink metadata.
704
- fn macos_fbsd_solaris_lstat (
704
+ fn macos_fbsd_solarish_lstat (
705
705
& mut self ,
706
706
path_op : & OpTy < ' tcx > ,
707
707
buf_op : & OpTy < ' tcx > ,
@@ -729,10 +729,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
729
729
Err ( err) => return this. set_last_error_and_return_i32 ( err) ,
730
730
} ;
731
731
732
- interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solaris_write_buf ( metadata, buf_op) ?) )
732
+ interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solarish_write_stat_buf ( metadata, buf_op) ?) )
733
733
}
734
734
735
- fn macos_fbsd_solaris_fstat (
735
+ fn macos_fbsd_solarish_fstat (
736
736
& mut self ,
737
737
fd_op : & OpTy < ' tcx > ,
738
738
buf_op : & OpTy < ' tcx > ,
@@ -759,7 +759,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
759
759
Ok ( metadata) => metadata,
760
760
Err ( err) => return this. set_last_error_and_return_i32 ( err) ,
761
761
} ;
762
- interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solaris_write_buf ( metadata, buf_op) ?) )
762
+ interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solarish_write_stat_buf ( metadata, buf_op) ?) )
763
763
}
764
764
765
765
fn linux_statx (
0 commit comments