From c73a50d9fa69f20b65e3da35fd1f02cbad66db1f Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 29 Sep 2024 13:24:06 -0600 Subject: [PATCH] Fix CI for FreeBSD 15 (#3950) It was failing for two reasons: * 87fbd9fc7[^1] removed the TCP_MAXPEAKRATE symbol. * 3458bbd39[^2] changed the value of RLIM_NLIMITS Fixes #3947 [^1]: https://github.com/freebsd/freebsd-src/commit/87fbd9fc7fc5f8d79fe5e3dcd13ad02b11a67ef0 [^2]: https://github.com/freebsd/freebsd-src/commit/3458bbd397783f3bb62713c54ae87f19eeb98dc0 --- libc-test/build.rs | 5 ++++- libc-test/semver/freebsd.txt | 1 - src/unix/bsd/freebsdlike/freebsd/mod.rs | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 938294717eee3..743f9f28404db 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2306,6 +2306,10 @@ fn test_freebsd(target: &str) { | "PWAIT" | "PLOCK" | "PPAUSE" | "PRI_MIN_TIMESHARE" | "PUSER" | "PI_AV" | "PI_NET" | "PI_DISK" | "PI_TTY" | "PI_DULL" | "PI_SOFT" => true, + // This constant changed in FreeBSD 15 (git 3458bbd397783). It was never intended to + // be stable, and probably shouldn't be bound by libc at all. + "RLIM_NLIMITS" => true, + // This symbol changed in FreeBSD 14 (git 051e7d78b03), but the new // version should be safe to use on older releases. "IFCAP_CANTCHANGE" => true, @@ -2436,7 +2440,6 @@ fn test_freebsd(target: &str) { // Flags introduced in FreeBSD 14. "TCP_MAXUNACKTIME" - | "TCP_MAXPEAKRATE" | "TCP_IDLE_REDUCE" | "TCP_REMOTE_UDP_ENCAPS_PORT" | "TCP_DELACK" diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index 933fea0e63e94..70484bbbb9579 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -1494,7 +1494,6 @@ TCP_KEEPIDLE TCP_KEEPINIT TCP_KEEPINTVL TCP_LOG_LIMIT -TCP_MAXPEAKRATE TCP_MAXSEG TCP_MAXUNACKTIME TCP_MD5SIG diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 3cf1fc1aeeef3..e7239fd965e07 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -3779,7 +3779,6 @@ pub const TCP_INFO: ::c_int = 32; pub const TCP_CONGESTION: ::c_int = 64; pub const TCP_CCALGOOPT: ::c_int = 65; pub const TCP_MAXUNACKTIME: ::c_int = 68; -pub const TCP_MAXPEAKRATE: ::c_int = 69; pub const TCP_IDLE_REDUCE: ::c_int = 70; pub const TCP_REMOTE_UDP_ENCAPS_PORT: ::c_int = 71; pub const TCP_DELACK: ::c_int = 72;