Skip to content

Commit e620284

Browse files
snoggetgross35
authored andcommitted
gnu sparc: Use a separate stat struct for 32bit powerpc
Like mips and powerpc, the stat struct will become different once support for gnu_file_offset_bits64 is added. (backport <rust-lang#4345>) (cherry picked from commit e134959)
1 parent 25d4c0a commit e620284

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

src/unix/linux_like/linux/gnu/b32/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ cfg_if! {
5454
if #[cfg(not(any(
5555
target_arch = "mips",
5656
target_arch = "mips32r6",
57-
target_arch = "powerpc"
57+
target_arch = "powerpc",
58+
target_arch = "sparc"
5859
)))] {
5960
s! {
6061
pub struct stat {

src/unix/linux_like/linux/gnu/b32/sparc/mod.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,29 @@ s! {
6060
pub ss_size: size_t,
6161
}
6262

63+
pub struct stat {
64+
pub st_dev: crate::dev_t,
65+
__pad1: c_ushort,
66+
pub st_ino: crate::ino_t,
67+
pub st_mode: crate::mode_t,
68+
pub st_nlink: crate::nlink_t,
69+
pub st_uid: crate::uid_t,
70+
pub st_gid: crate::gid_t,
71+
pub st_rdev: crate::dev_t,
72+
__pad2: c_ushort,
73+
pub st_size: off_t,
74+
pub st_blksize: crate::blksize_t,
75+
pub st_blocks: crate::blkcnt_t,
76+
pub st_atime: crate::time_t,
77+
pub st_atime_nsec: c_long,
78+
pub st_mtime: crate::time_t,
79+
pub st_mtime_nsec: c_long,
80+
pub st_ctime: crate::time_t,
81+
pub st_ctime_nsec: c_long,
82+
__glibc_reserved4: c_ulong,
83+
__glibc_reserved5: c_ulong,
84+
}
85+
6386
pub struct stat64 {
6487
pub st_dev: crate::dev_t,
6588
pub st_ino: crate::ino64_t,

0 commit comments

Comments
 (0)