Skip to content

Commit 9860f23

Browse files
committed
Fix CI on FreeBSD 15
A recent change has replaced an unused preprocessor symbol: P_UNUSED3 freebsd/freebsd-src@33be163 Another recent change has changed the size of a spare field: mc_spare freebsd/freebsd-src@eea3e4d
1 parent aa5bbcc commit 9860f23

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

libc-test/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2572,7 +2572,7 @@ fn test_freebsd(target: &str) {
25722572
"TDF_CANSWAP" | "TDF_SWAPINREQ" => true,
25732573

25742574
// Unaccessible in FreeBSD 15
2575-
"TDI_SWAPPED" | "P_SWAPPINGOUT" | "P_SWAPPINGIN" => true,
2575+
"TDI_SWAPPED" | "P_SWAPPINGOUT" | "P_SWAPPINGIN" | "P_UNUSED3" => true,
25762576

25772577
// Removed in FreeBSD 14 (git a6b55ee6be1)
25782578
"IFF_KNOWSEPOCH" => true,
@@ -2981,6 +2981,8 @@ fn test_freebsd(target: &str) {
29812981
// `tcp_snd_wscale` and `tcp_rcv_wscale` are bitfields
29822982
("tcp_info", "tcp_snd_wscale") => true,
29832983
("tcp_info", "tcp_rcv_wscale") => true,
2984+
// mc_spare can change in size between OS releases. It's a spare field, after all.
2985+
("__mcontext", "mc_spare") => true,
29842986

29852987
_ => false,
29862988
}

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4114,7 +4114,9 @@ pub const TDI_IWAIT: c_int = 0x0010;
41144114
pub const P_ADVLOCK: c_int = 0x00000001;
41154115
pub const P_CONTROLT: c_int = 0x00000002;
41164116
pub const P_KPROC: c_int = 0x00000004;
4117+
#[deprecated(since="1.0", note="Replaced in FreeBSD 15 by P_IDLEPROC")]
41174118
pub const P_UNUSED3: c_int = 0x00000008;
4119+
pub const P_IDLEPROC: c_int = 0x00000008;
41184120
pub const P_PPWAIT: c_int = 0x00000010;
41194121
pub const P_PROFIL: c_int = 0x00000020;
41204122
pub const P_STOPPROF: c_int = 0x00000040;

src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ s_no_extra_traits! {
137137
pub mc_gsbase: register_t,
138138
pub mc_xfpustate: register_t,
139139
pub mc_xfpustate_len: register_t,
140-
pub mc_spare: [c_long; 4],
140+
pub mc_tlsbase: register_t,
141+
pub mc_spare: [c_long; 3],
141142
}
142143
}
143144

0 commit comments

Comments
 (0)