Skip to content

Commit f7f3c7c

Browse files
committed
FreeBSD: Deprecate TCP_PCAP_OUT and TCP_PCAP_IN
FreeBSD removed these upstream in [1], so deprecate them here. This resolves a recent CI failure. These constants were originally added in [2]. [1]: freebsd/freebsd-src@6e76489 [2]: rust-lang#1151 (backport <rust-lang#4381>) (cherry picked from commit c8f0910)
1 parent a96d454 commit f7f3c7c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,6 +2855,9 @@ fn test_freebsd(target: &str) {
28552855
"CAP_UNUSED0_44" | "CAP_UNUSED0_57" | "CAP_UNUSED1_22" | "CAP_UNUSED1_57"
28562856
| "CAP_ALL0" | "CAP_ALL1" => true,
28572857

2858+
// FIXME(freebsd): Removed in FreeBSD 15, deprecated in libc
2859+
"TCP_PCAP_OUT" | "TCP_PCAP_IN" => true,
2860+
28582861
_ => false,
28592862
}
28602863
});

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3771,7 +3771,9 @@ pub const TCP_PERF_INFO: c_int = 78;
37713771
pub const TCP_LRD: c_int = 79;
37723772
pub const TCP_KEEPINIT: c_int = 128;
37733773
pub const TCP_FASTOPEN: c_int = 1025;
3774+
#[deprecated(since = "0.2.171", note = "removed in FreeBSD 15")]
37743775
pub const TCP_PCAP_OUT: c_int = 2048;
3776+
#[deprecated(since = "0.2.171", note = "removed in FreeBSD 15")]
37753777
pub const TCP_PCAP_IN: c_int = 4096;
37763778
pub const TCP_FUNCTION_BLK: c_int = 8192;
37773779
pub const TCP_FUNCTION_ALIAS: c_int = 8193;

0 commit comments

Comments
 (0)