Skip to content

Commit 3a27abe

Browse files
bossmctgross35
authored andcommitted
musl: Rename fields to match musl headers
[ squash "Re-add explicit padding in 32-bit statvfs", reword commit summary - Trevor ] (backport <rust-lang#3261>) (cherry picked from commit d210d71)
1 parent 78dd829 commit 3a27abe

File tree

1 file changed

+6
-4
lines changed
  • src/unix/linux_like/linux/musl

1 file changed

+6
-4
lines changed

src/unix/linux_like/linux/musl/mod.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ s! {
148148

149149
// `mips*` targets swap the `s_errno` and `s_code` fields otherwise this struct is
150150
// target-agnostic (see https://www.openwall.com/lists/musl/2016/01/27/1/2)
151+
//
152+
// FIXME(union): C implementation uses unions
151153
pub struct siginfo_t {
152154
pub si_signo: ::c_int,
153155
#[cfg(not(target_arch = "mips"))]
@@ -177,12 +179,12 @@ s! {
177179
#[cfg(target_endian = "little")]
178180
pub f_fsid: ::c_ulong,
179181
#[cfg(target_pointer_width = "32")]
180-
__f_unused: ::c_int,
182+
__pad: ::c_int,
181183
#[cfg(target_endian = "big")]
182184
pub f_fsid: ::c_ulong,
183185
pub f_flag: ::c_ulong,
184186
pub f_namemax: ::c_ulong,
185-
__f_spare: [::c_int; 6],
187+
__f_reserved: [::c_int; 6],
186188
}
187189

188190
pub struct statvfs64 {
@@ -197,12 +199,12 @@ s! {
197199
#[cfg(target_endian = "little")]
198200
pub f_fsid: ::c_ulong,
199201
#[cfg(target_pointer_width = "32")]
200-
__f_unused: ::c_int,
202+
__pad: ::c_int,
201203
#[cfg(target_endian = "big")]
202204
pub f_fsid: ::c_ulong,
203205
pub f_flag: ::c_ulong,
204206
pub f_namemax: ::c_ulong,
205-
__f_spare: [::c_int; 6],
207+
__f_reserved: [::c_int; 6],
206208
}
207209

208210
pub struct termios {

0 commit comments

Comments
 (0)