|
17 | 17 | pub st_rdev: crate::dev_t, |
18 | 18 | __st_padding2: Padding<[c_long; 2]>, |
19 | 19 | pub st_size: off_t, |
| 20 | + |
| 21 | + #[cfg(musl32_time64)] |
| 22 | + __st_atim32: Padding<__c_anonymous_timespec32>, |
| 23 | + #[cfg(musl32_time64)] |
| 24 | + __st_mtim32: Padding<__c_anonymous_timespec32>, |
| 25 | + #[cfg(musl32_time64)] |
| 26 | + __st_ctim32: Padding<__c_anonymous_timespec32>, |
| 27 | + |
| 28 | + #[cfg(not(musl32_time64))] |
20 | 29 | pub st_atime: crate::time_t, |
| 30 | + #[cfg(not(musl32_time64))] |
21 | 31 | pub st_atime_nsec: c_long, |
| 32 | + #[cfg(not(musl32_time64))] |
22 | 33 | pub st_mtime: crate::time_t, |
| 34 | + #[cfg(not(musl32_time64))] |
23 | 35 | pub st_mtime_nsec: c_long, |
| 36 | + #[cfg(not(musl32_time64))] |
24 | 37 | pub st_ctime: crate::time_t, |
| 38 | + #[cfg(not(musl32_time64))] |
25 | 39 | pub st_ctime_nsec: c_long, |
| 40 | + |
26 | 41 | pub st_blksize: crate::blksize_t, |
27 | 42 | __st_padding3: Padding<c_long>, |
28 | 43 | pub st_blocks: crate::blkcnt_t, |
| 44 | + #[cfg(not(musl32_time64))] |
29 | 45 | __st_padding4: Padding<[c_long; 14]>, |
| 46 | + |
| 47 | + #[cfg(musl32_time64)] |
| 48 | + pub st_atime: crate::time_t, |
| 49 | + #[cfg(all(musl32_time64, target_endian = "big"))] |
| 50 | + __st_atim__pad: Padding<u32>, |
| 51 | + #[cfg(musl32_time64)] |
| 52 | + pub st_atime_nsec: c_long, |
| 53 | + #[cfg(all(musl32_time64, target_endian = "little"))] |
| 54 | + __st_atim__pad: Padding<u32>, |
| 55 | + |
| 56 | + #[cfg(musl32_time64)] |
| 57 | + pub st_mtime: crate::time_t, |
| 58 | + #[cfg(all(musl32_time64, target_endian = "big"))] |
| 59 | + __st_mtim__pad: Padding<u32>, |
| 60 | + #[cfg(musl32_time64)] |
| 61 | + pub st_mtime_nsec: c_long, |
| 62 | + #[cfg(all(musl32_time64, target_endian = "little"))] |
| 63 | + __st_mtim__pad: Padding<u32>, |
| 64 | + |
| 65 | + #[cfg(musl32_time64)] |
| 66 | + pub st_ctime: crate::time_t, |
| 67 | + #[cfg(all(musl32_time64, target_endian = "big"))] |
| 68 | + __st_ctim__pad: Padding<u32>, |
| 69 | + #[cfg(musl32_time64)] |
| 70 | + pub st_ctime_nsec: c_long, |
| 71 | + #[cfg(all(musl32_time64, target_endian = "little"))] |
| 72 | + __st_ctim__pad: Padding<u32>, |
| 73 | + |
| 74 | + #[cfg(musl32_time64)] |
| 75 | + __st_padding4: Padding<[c_long; 2]>, |
| 76 | + } |
| 77 | + |
| 78 | + struct __c_anonymous_timespec32 { |
| 79 | + __tv_sec: c_long, |
| 80 | + __tv_nsec: c_long, |
30 | 81 | } |
31 | 82 |
|
32 | 83 | pub struct stack_t { |
@@ -58,40 +109,40 @@ s! { |
58 | 109 | pub struct shmid_ds { |
59 | 110 | pub shm_perm: crate::ipc_perm, |
60 | 111 | pub shm_segsz: size_t, |
| 112 | + #[cfg(not(musl32_time64))] |
61 | 113 | pub shm_atime: crate::time_t, |
| 114 | + #[cfg(not(musl32_time64))] |
62 | 115 | pub shm_dtime: crate::time_t, |
| 116 | + #[cfg(not(musl32_time64))] |
63 | 117 | pub shm_ctime: crate::time_t, |
| 118 | + #[cfg(musl32_time64)] |
| 119 | + __shm_atime_lo: Padding<c_long>, |
| 120 | + #[cfg(musl32_time64)] |
| 121 | + __shm_dtime_lo: Padding<c_long>, |
| 122 | + #[cfg(musl32_time64)] |
| 123 | + __shm_ctime_lo: Padding<c_long>, |
64 | 124 | pub shm_cpid: crate::pid_t, |
65 | 125 | pub shm_lpid: crate::pid_t, |
66 | 126 | pub shm_nattch: c_ulong, |
| 127 | + #[cfg(not(musl32_time64))] |
67 | 128 | __pad1: Padding<c_ulong>, |
| 129 | + #[cfg(not(musl32_time64))] |
68 | 130 | __pad2: Padding<c_ulong>, |
69 | | - } |
70 | 131 |
|
71 | | - pub struct msqid_ds { |
72 | | - pub msg_perm: crate::ipc_perm, |
73 | | - #[cfg(target_endian = "big")] |
74 | | - __unused1: Padding<c_int>, |
75 | | - pub msg_stime: crate::time_t, |
76 | | - #[cfg(target_endian = "little")] |
77 | | - __unused1: Padding<c_int>, |
78 | | - #[cfg(target_endian = "big")] |
79 | | - __unused2: Padding<c_int>, |
80 | | - pub msg_rtime: crate::time_t, |
81 | | - #[cfg(target_endian = "little")] |
82 | | - __unused2: Padding<c_int>, |
83 | | - #[cfg(target_endian = "big")] |
84 | | - __unused3: Padding<c_int>, |
85 | | - pub msg_ctime: crate::time_t, |
86 | | - #[cfg(target_endian = "little")] |
87 | | - __unused3: Padding<c_int>, |
88 | | - pub __msg_cbytes: c_ulong, |
89 | | - pub msg_qnum: crate::msgqnum_t, |
90 | | - pub msg_qbytes: crate::msglen_t, |
91 | | - pub msg_lspid: crate::pid_t, |
92 | | - pub msg_lrpid: crate::pid_t, |
93 | | - __pad1: Padding<c_ulong>, |
94 | | - __pad2: Padding<c_ulong>, |
| 132 | + #[cfg(musl32_time64)] |
| 133 | + __shm_atime_hi: Padding<c_ushort>, |
| 134 | + #[cfg(musl32_time64)] |
| 135 | + __shm_dtime_hi: Padding<c_ushort>, |
| 136 | + #[cfg(musl32_time64)] |
| 137 | + __shm_ctime_hi: Padding<c_ushort>, |
| 138 | + #[cfg(musl32_time64)] |
| 139 | + __pad1: Padding<c_ushort>, |
| 140 | + #[cfg(musl32_time64)] |
| 141 | + pub shm_atime: crate::time_t, |
| 142 | + #[cfg(musl32_time64)] |
| 143 | + pub shm_dtime: crate::time_t, |
| 144 | + #[cfg(musl32_time64)] |
| 145 | + pub shm_ctime: crate::time_t, |
95 | 146 | } |
96 | 147 |
|
97 | 148 | pub struct statfs { |
@@ -125,6 +176,94 @@ s! { |
125 | 176 | } |
126 | 177 | } |
127 | 178 |
|
| 179 | +cfg_if! { |
| 180 | + if #[cfg(musl32_time64)] { |
| 181 | + s! { |
| 182 | + pub struct msqid_ds { |
| 183 | + pub msg_perm: crate::ipc_perm, |
| 184 | + |
| 185 | + #[cfg(target_endian = "big")] |
| 186 | + __msg_stime_hi: Padding<c_ulong>, |
| 187 | + #[cfg(target_endian = "big")] |
| 188 | + __msg_stime_lo: Padding<c_ulong>, |
| 189 | + #[cfg(target_endian = "big")] |
| 190 | + __msg_rtime_hi: Padding<c_ulong>, |
| 191 | + #[cfg(target_endian = "big")] |
| 192 | + __msg_rtime_lo: Padding<c_ulong>, |
| 193 | + #[cfg(target_endian = "big")] |
| 194 | + __msg_ctime_hi: Padding<c_ulong>, |
| 195 | + #[cfg(target_endian = "big")] |
| 196 | + __msg_ctime_lo: Padding<c_ulong>, |
| 197 | + |
| 198 | + #[cfg(target_endian = "little")] |
| 199 | + __msg_stime_lo: Padding<c_ulong>, |
| 200 | + #[cfg(target_endian = "little")] |
| 201 | + __msg_stime_hi: Padding<c_ulong>, |
| 202 | + #[cfg(target_endian = "little")] |
| 203 | + __msg_rtime_lo: Padding<c_ulong>, |
| 204 | + #[cfg(target_endian = "little")] |
| 205 | + __msg_rtime_hi: Padding<c_ulong>, |
| 206 | + #[cfg(target_endian = "little")] |
| 207 | + __msg_ctime_lo: Padding<c_ulong>, |
| 208 | + #[cfg(target_endian = "little")] |
| 209 | + __msg_ctime_hi: Padding<c_ulong>, |
| 210 | + |
| 211 | + pub __msg_cbytes: c_ulong, |
| 212 | + pub msg_qnum: crate::msgqnum_t, |
| 213 | + pub msg_qbytes: crate::msglen_t, |
| 214 | + pub msg_lspid: crate::pid_t, |
| 215 | + pub msg_lrpid: crate::pid_t, |
| 216 | + __pad1: Padding<c_ulong>, |
| 217 | + __pad2: Padding<c_ulong>, |
| 218 | + |
| 219 | + pub msg_stime: crate::time_t, |
| 220 | + pub msg_rtime: crate::time_t, |
| 221 | + pub msg_ctime: crate::time_t, |
| 222 | + } |
| 223 | + } |
| 224 | + } else { |
| 225 | + s! { |
| 226 | + pub struct msqid_ds { |
| 227 | + pub msg_perm: crate::ipc_perm, |
| 228 | + |
| 229 | + #[cfg(target_endian = "big")] |
| 230 | + __unused1: Padding<c_int>, |
| 231 | + #[cfg(target_endian = "big")] |
| 232 | + pub msg_stime: crate::time_t, |
| 233 | + #[cfg(target_endian = "big")] |
| 234 | + __unused2: Padding<c_int>, |
| 235 | + #[cfg(target_endian = "big")] |
| 236 | + pub msg_rtime: crate::time_t, |
| 237 | + #[cfg(target_endian = "big")] |
| 238 | + __unused3: Padding<c_int>, |
| 239 | + #[cfg(target_endian = "big")] |
| 240 | + pub msg_ctime: crate::time_t, |
| 241 | + |
| 242 | + #[cfg(target_endian = "little")] |
| 243 | + pub msg_stime: crate::time_t, |
| 244 | + #[cfg(target_endian = "little")] |
| 245 | + __unused1: Padding<c_int>, |
| 246 | + #[cfg(target_endian = "little")] |
| 247 | + pub msg_rtime: crate::time_t, |
| 248 | + #[cfg(target_endian = "little")] |
| 249 | + __unused2: Padding<c_int>, |
| 250 | + #[cfg(target_endian = "little")] |
| 251 | + pub msg_ctime: crate::time_t, |
| 252 | + #[cfg(target_endian = "little")] |
| 253 | + __unused3: Padding<c_int>, |
| 254 | + |
| 255 | + pub __msg_cbytes: c_ulong, |
| 256 | + pub msg_qnum: crate::msgqnum_t, |
| 257 | + pub msg_qbytes: crate::msglen_t, |
| 258 | + pub msg_lspid: crate::pid_t, |
| 259 | + pub msg_lrpid: crate::pid_t, |
| 260 | + __pad1: Padding<c_ulong>, |
| 261 | + __pad2: Padding<c_ulong>, |
| 262 | + } |
| 263 | + } |
| 264 | + } |
| 265 | +} |
| 266 | + |
128 | 267 | s_no_extra_traits! { |
129 | 268 | #[repr(align(8))] |
130 | 269 | pub struct max_align_t { |
|
0 commit comments