Skip to content

Commit bce5501

Browse files
committed
gnu powerpc: Use a separate stat struct for powerpc
Like mips, the stat struct will become different once support for gnu_file_offset_bits64 is added.
1 parent 304076e commit bce5501

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ cfg_if! {
5151
}
5252

5353
cfg_if! {
54-
if #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] {
54+
if #[cfg(not(any(
55+
target_arch = "mips",
56+
target_arch = "mips32r6",
57+
target_arch = "powerpc"
58+
)))] {
5559
s! {
5660
pub struct stat {
5761
pub st_dev: crate::dev_t,

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,28 @@ s! {
5757
__glibc_reserved2: u64,
5858
}
5959

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

0 commit comments

Comments
 (0)