Skip to content

Commit

Permalink
Remove array-size hacks for private fields
Browse files Browse the repository at this point in the history
  • Loading branch information
cramertj committed Nov 26, 2024
1 parent 4dc6a1c commit a1c30e3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ s! {

pub struct accept_filter_arg {
pub af_name: [::c_char; 16],
af_arg: [[::c_char; 10]; 24],
af_arg: [::c_char; 256 - 16],
}

pub struct ptrace_io_desc {
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ s! {

pub struct accept_filter_arg {
pub af_name: [::c_char; 16],
af_arg: [[::c_char; 10]; 24],
af_arg: [::c_char; 256 - 16],
}

pub struct ki_sigset_t {
Expand Down
4 changes: 1 addition & 3 deletions src/unix/linux_like/android/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ s! {
pub sp: ::c_ulonglong,
pub pc: ::c_ulonglong,
pub pstate: ::c_ulonglong,
// nested arrays to get the right size/length while being able to
// auto-derive traits like Debug
__reserved: [[u64; 32]; 16],
__reserved: [u64; 512],
}

pub struct user_fpsimd_struct {
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ s_no_extra_traits! {
pub struct prop_info {
__name: [::c_char; 32],
__serial: ::c_uint,
__value: [[::c_char; 4]; 23],
__value: [::c_char; 92],
}

pub union __c_anonymous_ifr_ifru {
Expand Down
4 changes: 1 addition & 3 deletions src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,7 @@ s! {
pub sp: ::c_ulonglong,
pub pc: ::c_ulonglong,
pub pstate: ::c_ulonglong,
// nested arrays to get the right size/length while being able to
// auto-derive traits like Debug
__reserved: [[u64; 32]; 16],
__reserved: [u64; 512],
}

pub struct user_fpsimd_struct {
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/musl/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ s! {
pub sp: ::c_ulong,
pub pc: ::c_ulong,
pub pstate: ::c_ulong,
__reserved: [[u64; 32]; 16],
__reserved: [u64; 512],
}

#[repr(align(8))]
Expand Down

0 comments on commit a1c30e3

Please sign in to comment.