@@ -273,7 +273,7 @@ impl UnixFileDescription for FileHandle {
273273
274274impl < ' tcx > EvalContextExtPrivate < ' tcx > for crate :: MiriInterpCx < ' tcx > { }
275275trait EvalContextExtPrivate < ' tcx > : crate :: MiriInterpCxExt < ' tcx > {
276- fn macos_fbsd_solaris_write_buf (
276+ fn macos_fbsd_solarish_write_stat_buf (
277277 & mut self ,
278278 metadata : FileMetadata ,
279279 buf_op : & OpTy < ' tcx > ,
@@ -321,9 +321,9 @@ trait EvalContextExtPrivate<'tcx>: crate::MiriInterpCxExt<'tcx> {
321321 }
322322
323323 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 ) ? ) ?;
327327 }
328328
329329 interp_ok ( 0 )
@@ -668,7 +668,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
668668 interp_ok ( Scalar :: from_i32 ( this. try_unwrap_io_result ( result) ?) )
669669 }
670670
671- fn macos_fbsd_solaris_stat (
671+ fn macos_fbsd_solarish_stat (
672672 & mut self ,
673673 path_op : & OpTy < ' tcx > ,
674674 buf_op : & OpTy < ' tcx > ,
@@ -694,11 +694,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
694694 Err ( err) => return this. set_last_error_and_return_i32 ( err) ,
695695 } ;
696696
697- interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solaris_write_buf ( metadata, buf_op) ?) )
697+ interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solarish_write_stat_buf ( metadata, buf_op) ?) )
698698 }
699699
700700 // `lstat` is used to get symlink metadata.
701- fn macos_fbsd_solaris_lstat (
701+ fn macos_fbsd_solarish_lstat (
702702 & mut self ,
703703 path_op : & OpTy < ' tcx > ,
704704 buf_op : & OpTy < ' tcx > ,
@@ -726,10 +726,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
726726 Err ( err) => return this. set_last_error_and_return_i32 ( err) ,
727727 } ;
728728
729- interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solaris_write_buf ( metadata, buf_op) ?) )
729+ interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solarish_write_stat_buf ( metadata, buf_op) ?) )
730730 }
731731
732- fn macos_fbsd_solaris_fstat (
732+ fn macos_fbsd_solarish_fstat (
733733 & mut self ,
734734 fd_op : & OpTy < ' tcx > ,
735735 buf_op : & OpTy < ' tcx > ,
@@ -756,7 +756,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
756756 Ok ( metadata) => metadata,
757757 Err ( err) => return this. set_last_error_and_return_i32 ( err) ,
758758 } ;
759- interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solaris_write_buf ( metadata, buf_op) ?) )
759+ interp_ok ( Scalar :: from_i32 ( this. macos_fbsd_solarish_write_stat_buf ( metadata, buf_op) ?) )
760760 }
761761
762762 fn linux_statx (
0 commit comments