Skip to content

Commit a1c30e3

Browse files
committed
Remove array-size hacks for private fields
1 parent 4dc6a1c commit a1c30e3

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ s! {
284284

285285
pub struct accept_filter_arg {
286286
pub af_name: [::c_char; 16],
287-
af_arg: [[::c_char; 10]; 24],
287+
af_arg: [::c_char; 256 - 16],
288288
}
289289

290290
pub struct ptrace_io_desc {

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ s! {
520520

521521
pub struct accept_filter_arg {
522522
pub af_name: [::c_char; 16],
523-
af_arg: [[::c_char; 10]; 24],
523+
af_arg: [::c_char; 256 - 16],
524524
}
525525

526526
pub struct ki_sigset_t {

src/unix/linux_like/android/b64/aarch64/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ s! {
7272
pub sp: ::c_ulonglong,
7373
pub pc: ::c_ulonglong,
7474
pub pstate: ::c_ulonglong,
75-
// nested arrays to get the right size/length while being able to
76-
// auto-derive traits like Debug
77-
__reserved: [[u64; 32]; 16],
75+
__reserved: [u64; 512],
7876
}
7977

8078
pub struct user_fpsimd_struct {

src/unix/linux_like/android/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ s_no_extra_traits! {
608608
pub struct prop_info {
609609
__name: [::c_char; 32],
610610
__serial: ::c_uint,
611-
__value: [[::c_char; 4]; 23],
611+
__value: [::c_char; 92],
612612
}
613613

614614
pub union __c_anonymous_ifr_ifru {

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,7 @@ s! {
212212
pub sp: ::c_ulonglong,
213213
pub pc: ::c_ulonglong,
214214
pub pstate: ::c_ulonglong,
215-
// nested arrays to get the right size/length while being able to
216-
// auto-derive traits like Debug
217-
__reserved: [[u64; 32]; 16],
215+
__reserved: [u64; 512],
218216
}
219217

220218
pub struct user_fpsimd_struct {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ s! {
8484
pub sp: ::c_ulong,
8585
pub pc: ::c_ulong,
8686
pub pstate: ::c_ulong,
87-
__reserved: [[u64; 32]; 16],
87+
__reserved: [u64; 512],
8888
}
8989

9090
#[repr(align(8))]

0 commit comments

Comments
 (0)