@@ -200,7 +200,7 @@ pub struct RuxStat {
200200 /// Total size, in bytes.
201201 pub st_size : i64 ,
202202 /// Block size for filesystem I/O.
203- pub st_blksize : core:: ffi:: c_long ,
203+ pub st_blksize : core:: ffi:: c_int ,
204204 /// Padding to maintain alignment.
205205 pub __pad2 : core:: ffi:: c_int ,
206206 /// Number of 512B blocks allocated.
@@ -216,7 +216,43 @@ pub struct RuxStat {
216216}
217217
218218///Rust version for struct stat in ctypes. Represents file status information.
219- #[ cfg( any( target_arch = "x86_64" , target_arch = "riscv64" ) ) ]
219+ #[ cfg( target_arch = "riscv64" ) ]
220+ #[ derive( Default ) ]
221+ pub struct RuxStat {
222+ /// Device identifier.
223+ pub st_dev : u64 ,
224+ /// Inode number.
225+ pub st_ino : u64 ,
226+ /// Number of hard links.
227+ pub st_nlink : u64 ,
228+ /// File mode and permissions.
229+ pub st_mode : core:: ffi:: c_uint ,
230+ /// User ID of owner.
231+ pub st_uid : core:: ffi:: c_uint ,
232+ /// Group ID of owner.
233+ pub st_gid : core:: ffi:: c_uint ,
234+ /// Padding to maintain alignment.
235+ pub __pad0 : core:: ffi:: c_uint ,
236+ /// Device ID (if special file).
237+ pub st_rdev : u64 ,
238+ /// Total size, in bytes.
239+ pub st_size : i64 ,
240+ /// Block size for filesystem I/O.
241+ pub st_blksize : core:: ffi:: c_int ,
242+ /// Number of 512B blocks allocated.
243+ pub st_blocks : i64 ,
244+ /// Time of last access.
245+ pub st_atime : RuxTimeSpec ,
246+ /// Time of last modification.
247+ pub st_mtime : RuxTimeSpec ,
248+ /// Time of last status change.
249+ pub st_ctime : RuxTimeSpec ,
250+ /// Unused space, reserved for future use.
251+ pub __unused : [ core:: ffi:: c_long ; 3usize ] ,
252+ }
253+
254+ ///Rust version for struct stat in ctypes. Represents file status information.
255+ #[ cfg( target_arch = "x86_64" ) ]
220256#[ derive( Default ) ]
221257pub struct RuxStat {
222258 /// Device identifier.
0 commit comments