diff --git a/libc-test/build.rs b/libc-test/build.rs index 23eef46d3e617..c2eb221152bc3 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2572,7 +2572,7 @@ fn test_freebsd(target: &str) { "TDF_CANSWAP" | "TDF_SWAPINREQ" => true, // Unaccessible in FreeBSD 15 - "TDI_SWAPPED" | "P_SWAPPINGOUT" | "P_SWAPPINGIN" => true, + "TDI_SWAPPED" | "P_SWAPPINGOUT" | "P_SWAPPINGIN" | "P_UNUSED3" => true, // Removed in FreeBSD 14 (git a6b55ee6be1) "IFF_KNOWSEPOCH" => true, @@ -2981,6 +2981,8 @@ fn test_freebsd(target: &str) { // `tcp_snd_wscale` and `tcp_rcv_wscale` are bitfields ("tcp_info", "tcp_snd_wscale") => true, ("tcp_info", "tcp_rcv_wscale") => true, + // mc_spare can change in size between OS releases. It's a spare field, after all. + ("__mcontext", "mc_spare") => true, _ => false, } diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index aeff2d987e3ce..d29e142e272be 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -4116,7 +4116,9 @@ pub const TDI_IWAIT: c_int = 0x0010; pub const P_ADVLOCK: c_int = 0x00000001; pub const P_CONTROLT: c_int = 0x00000002; pub const P_KPROC: c_int = 0x00000004; +#[deprecated(since="1.0", note="Replaced in FreeBSD 15 by P_IDLEPROC")] pub const P_UNUSED3: c_int = 0x00000008; +pub const P_IDLEPROC: c_int = 0x00000008; pub const P_PPWAIT: c_int = 0x00000010; pub const P_PROFIL: c_int = 0x00000020; pub const P_STOPPROF: c_int = 0x00000040; diff --git a/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs b/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs index 40e1d72e2041e..4ee20901436cf 100644 --- a/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs @@ -137,7 +137,8 @@ s_no_extra_traits! { pub mc_gsbase: register_t, pub mc_xfpustate: register_t, pub mc_xfpustate_len: register_t, - pub mc_spare: [c_long; 4], + pub mc_tlsbase: register_t, + pub mc_spare: [c_long; 3], } }