Skip to content

Commit 377c52a

Browse files
authored
Fix CI for FreeBSD 15, on libc-0.2 branch (#3952)
It was failing for two reasons: * 87fbd9fc71[^1] removed the TCP_MAXPEAKRATE symbol. * 3458bbd392[^2] changed the value of RLIM_NLIMITS This is effectively a merge of #3950 (commit 590d78d) from the main branch. Fixes #3947 [^1]: freebsd/freebsd-src@87fbd9f [^2]: freebsd/freebsd-src@3458bbd
1 parent b9e8477 commit 377c52a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

libc-test/build.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -2338,6 +2338,9 @@ fn test_freebsd(target: &str) {
23382338
// base system anyway.
23392339
"CTL_MAXID" | "KERN_MAXID" | "HW_MAXID" | "USER_MAXID" => true,
23402340

2341+
// Deprecated and removed in FreeBSD 15. It was never actually implemented.
2342+
"TCP_MAXPEAKRATE" => true,
2343+
23412344
// FIXME: This is deprecated - remove in a couple of releases.
23422345
// This was removed in FreeBSD 14 (git 1b4701fe1e8) and never
23432346
// should've been used anywhere anyway.
@@ -2364,6 +2367,10 @@ fn test_freebsd(target: &str) {
23642367
| "PWAIT" | "PLOCK" | "PPAUSE" | "PRI_MIN_TIMESHARE" | "PUSER" | "PI_AV" | "PI_NET"
23652368
| "PI_DISK" | "PI_TTY" | "PI_DULL" | "PI_SOFT" => true,
23662369

2370+
// This constant changed in FreeBSD 15 (git 3458bbd397783). It was never intended to
2371+
// be stable, and probably shouldn't be bound by libc at all.
2372+
"RLIM_NLIMITS" => true,
2373+
23672374
// This symbol changed in FreeBSD 14 (git 051e7d78b03), but the new
23682375
// version should be safe to use on older releases.
23692376
"IFCAP_CANTCHANGE" => true,
@@ -2494,7 +2501,6 @@ fn test_freebsd(target: &str) {
24942501

24952502
// Flags introduced in FreeBSD 14.
24962503
"TCP_MAXUNACKTIME"
2497-
| "TCP_MAXPEAKRATE"
24982504
| "TCP_IDLE_REDUCE"
24992505
| "TCP_REMOTE_UDP_ENCAPS_PORT"
25002506
| "TCP_DELACK"

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

+1
Original file line numberDiff line numberDiff line change
@@ -3843,6 +3843,7 @@ pub const TCP_INFO: ::c_int = 32;
38433843
pub const TCP_CONGESTION: ::c_int = 64;
38443844
pub const TCP_CCALGOOPT: ::c_int = 65;
38453845
pub const TCP_MAXUNACKTIME: ::c_int = 68;
3846+
#[deprecated(since = "0.2.160", note = "Removed in FreeBSD 15")]
38463847
pub const TCP_MAXPEAKRATE: ::c_int = 69;
38473848
pub const TCP_IDLE_REDUCE: ::c_int = 70;
38483849
pub const TCP_REMOTE_UDP_ENCAPS_PORT: ::c_int = 71;

0 commit comments

Comments
 (0)