Skip to content

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

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

+23-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ pub type wchar_t = i32;
55

66
s! {
77
pub struct stat {
8+
#[cfg(not(gnu_time_bits64))]
89
pub st_dev: c_ulong,
10+
#[cfg(gnu_time_bits64)]
11+
pub st_dev: crate::dev_t,
912

13+
#[cfg(not(gnu_time_bits64))]
1014
st_pad1: [c_long; 3],
1115

1216
pub st_ino: crate::ino_t,
@@ -16,29 +20,46 @@ s! {
1620
pub st_uid: crate::uid_t,
1721
pub st_gid: crate::gid_t,
1822

23+
#[cfg(not(gnu_time_bits64))]
1924
pub st_rdev: c_ulong,
25+
#[cfg(gnu_time_bits64)]
26+
pub st_rdev: crate::dev_t,
2027

2128
#[cfg(not(gnu_file_offset_bits64))]
2229
st_pad2: [c_long; 2],
23-
#[cfg(gnu_file_offset_bits64)]
30+
#[cfg(all(not(gnu_time_bits64), gnu_file_offset_bits64))]
2431
st_pad2: [c_long; 3],
2532

2633
pub st_size: off_t,
2734

2835
#[cfg(not(gnu_file_offset_bits64))]
2936
st_pad3: c_long,
3037

38+
#[cfg(gnu_time_bits64)]
39+
pub st_blksize: crate::blksize_t,
40+
#[cfg(gnu_time_bits64)]
41+
pub st_blocks: crate::blkcnt_t,
42+
3143
pub st_atime: crate::time_t,
44+
#[cfg(gnu_time_bits64)]
45+
_atime_pad: c_int,
3246
pub st_atime_nsec: c_long,
3347
pub st_mtime: crate::time_t,
48+
#[cfg(gnu_time_bits64)]
49+
_mtime_pad: c_int,
3450
pub st_mtime_nsec: c_long,
3551
pub st_ctime: crate::time_t,
52+
#[cfg(gnu_time_bits64)]
53+
_ctime_pad: c_int,
3654
pub st_ctime_nsec: c_long,
3755

56+
#[cfg(not(gnu_time_bits64))]
3857
pub st_blksize: crate::blksize_t,
39-
#[cfg(gnu_file_offset_bits64)]
58+
#[cfg(all(not(gnu_time_bits64), gnu_file_offset_bits64))]
4059
st_pad4: c_long,
60+
#[cfg(not(gnu_time_bits64))]
4161
pub st_blocks: crate::blkcnt_t,
62+
#[cfg(not(gnu_time_bits64))]
4263
st_pad5: [c_long; 14],
4364
}
4465

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

+11-3
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@ cfg_if! {
7979
pub struct stat {
8080
pub st_dev: crate::dev_t,
8181

82+
#[cfg(not(gnu_time_bits64))]
8283
__pad1: c_uint,
8384

84-
#[cfg(not(gnu_file_offset_bits64))]
85+
#[cfg(any(gnu_time_bits64, not(gnu_file_offset_bits64)))]
8586
pub st_ino: crate::ino_t,
86-
#[cfg(all(gnu_file_offset_bits64))]
87+
#[cfg(all(not(gnu_time_bits64), gnu_file_offset_bits64))]
8788
__st_ino: __ino_t,
8889

8990
pub st_mode: crate::mode_t,
@@ -93,6 +94,7 @@ cfg_if! {
9394

9495
pub st_rdev: crate::dev_t,
9596

97+
#[cfg(not(gnu_time_bits64))]
9698
__pad2: c_uint,
9799

98100
pub st_size: off_t,
@@ -102,16 +104,22 @@ cfg_if! {
102104

103105
pub st_atime: crate::time_t,
104106
pub st_atime_nsec: c_long,
107+
#[cfg(gnu_time_bits64)]
108+
_atime_pad: c_int,
105109
pub st_mtime: crate::time_t,
106110
pub st_mtime_nsec: c_long,
111+
#[cfg(gnu_time_bits64)]
112+
_mtime_pad: c_int,
107113
pub st_ctime: crate::time_t,
108114
pub st_ctime_nsec: c_long,
115+
#[cfg(gnu_time_bits64)]
116+
_ctime_pad: c_int,
109117

110118
#[cfg(not(gnu_file_offset_bits64))]
111119
__glibc_reserved4: c_long,
112120
#[cfg(not(gnu_file_offset_bits64))]
113121
__glibc_reserved5: c_long,
114-
#[cfg(gnu_file_offset_bits64)]
122+
#[cfg(all(not(gnu_time_bits64), gnu_file_offset_bits64))]
115123
pub st_ino: crate::ino_t,
116124
}
117125
}

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

+9
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,26 @@ s! {
6767
pub st_uid: crate::uid_t,
6868
pub st_gid: crate::gid_t,
6969
pub st_rdev: crate::dev_t,
70+
#[cfg(not(gnu_time_bits64))]
7071
__pad2: c_ushort,
7172
pub st_size: off_t,
7273
pub st_blksize: crate::blksize_t,
7374
pub st_blocks: crate::blkcnt_t,
7475
pub st_atime: crate::time_t,
76+
#[cfg(gnu_time_bits64)]
77+
_atime_pad: c_int,
7578
pub st_atime_nsec: c_long,
7679
pub st_mtime: crate::time_t,
80+
#[cfg(gnu_time_bits64)]
81+
_mtime_pad: c_int,
7782
pub st_mtime_nsec: c_long,
7883
pub st_ctime: crate::time_t,
84+
#[cfg(gnu_time_bits64)]
85+
_ctime_pad: c_int,
7986
pub st_ctime_nsec: c_long,
87+
#[cfg(not(gnu_time_bits64))]
8088
__glibc_reserved4: c_ulong,
89+
#[cfg(not(gnu_time_bits64))]
8190
__glibc_reserved5: c_ulong,
8291
}
8392

0 commit comments

Comments
 (0)