Skip to content

Commit

Permalink
musl: Rename fields to match musl headers
Browse files Browse the repository at this point in the history
[ squash "Re-add explicit padding in 32-bit statvfs", reword commit
  summary - Trevor ]

(backport <rust-lang#3261>)
(cherry picked from commit d210d71)
  • Loading branch information
bossmc authored and tgross35 committed Nov 25, 2024
1 parent 2a8a70c commit ad0acd9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ s! {

// `mips*` targets swap the `s_errno` and `s_code` fields otherwise this struct is
// target-agnostic (see https://www.openwall.com/lists/musl/2016/01/27/1/2)
//
// FIXME(union): C implementation uses unions
pub struct siginfo_t {
pub si_signo: ::c_int,
#[cfg(not(target_arch = "mips"))]
Expand Down Expand Up @@ -177,12 +179,12 @@ s! {
#[cfg(target_endian = "little")]
pub f_fsid: ::c_ulong,
#[cfg(target_pointer_width = "32")]
__f_unused: ::c_int,
__pad: ::c_int,
#[cfg(target_endian = "big")]
pub f_fsid: ::c_ulong,
pub f_flag: ::c_ulong,
pub f_namemax: ::c_ulong,
__f_spare: [::c_int; 6],
__f_reserved: [::c_int; 6],
}

pub struct statvfs64 {
Expand All @@ -197,12 +199,12 @@ s! {
#[cfg(target_endian = "little")]
pub f_fsid: ::c_ulong,
#[cfg(target_pointer_width = "32")]
__f_unused: ::c_int,
__pad: ::c_int,
#[cfg(target_endian = "big")]
pub f_fsid: ::c_ulong,
pub f_flag: ::c_ulong,
pub f_namemax: ::c_ulong,
__f_spare: [::c_int; 6],
__f_reserved: [::c_int; 6],
}

pub struct termios {
Expand Down

0 comments on commit ad0acd9

Please sign in to comment.