diff --git a/libc-test/build.rs b/libc-test/build.rs index 1cbacfde9d979..b2269801bdfa3 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -4142,6 +4142,10 @@ fn test_linux(target: &str) { // FIXME(musl): New fields in newer versions "utmpx" if !old_musl => true, + // FIXME(linux): Requires >= 6.16 kernel headers. + // On 64 bits the size did not change, skip only for 32 bits. + "ptrace_syscall_info" if pointer_width == 32 => true, + _ => false, } }); @@ -4683,7 +4687,9 @@ fn test_linux(target: &str) { true } // the `u` field is in fact an anonymous union - ("ptrace_syscall_info", "u" | "pad") if gnu => true, + ("ptrace_syscall_info", "u") if gnu => true, + // FIXME(linux): `flags` requires >= 6.16 kernel headers + ("ptrace_syscall_info", "flags") if gnu => true, // the vregs field is a `__uint128_t` C's type. ("user_fpsimd_struct", "vregs") => true, // Linux >= 5.11 tweaked the `svm_zero` field of the `sockaddr_vm` struct. diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index da04274afa213..3c0cb5e093615 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -171,7 +171,7 @@ s! { } pub struct __c_anonymous_ptrace_syscall_info_exit { - pub sval: crate::__s64, + pub rval: crate::__s64, pub is_error: crate::__u8, } @@ -179,11 +179,13 @@ s! { pub nr: crate::__u64, pub args: [crate::__u64; 6], pub ret_data: crate::__u32, + reserved2: Padding, } pub struct ptrace_syscall_info { pub op: crate::__u8, - pub pad: [crate::__u8; 3], + reserved: Padding, + pub flags: crate::__u16, pub arch: crate::__u32, pub instruction_pointer: crate::__u64, pub stack_pointer: crate::__u64,