diff --git a/libc-test/build.rs b/libc-test/build.rs index 794e2ef9d1a2..d3af5e5db1e7 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2574,7 +2574,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, @@ -2986,6 +2986,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 b010a1b30ee3..7c420d703cc0 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -4186,7 +4186,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;