Skip to content

Commit 37cde5a

Browse files
xbjfktgross35
authored andcommitted
musl: struct tcp_info: add new fields since 1.2.0/1.2.2
This reflects the upstream commits, 5e0c9f2 and d4f2981, which reflect changes in linux 5.4 and 5.5 respectively As mentioned in the comments, this is possible now as the CI musl version has updated and the headers are newer. (backport <rust-lang#4443>) (cherry picked from commit fb4212a)
1 parent d63132d commit 37cde5a

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4205,6 +4205,9 @@ fn test_linux(target: &str) {
42054205
// FIXME(linux): Requires >= 6.4 kernel headers.
42064206
"ptrace_sud_config" => true,
42074207

4208+
// Struct has changed for new musl versions
4209+
"tcp_info" if old_musl => true,
4210+
42084211
_ => false,
42094212
}
42104213
});

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -323,16 +323,11 @@ s! {
323323
pub tcpi_probes: u8,
324324
pub tcpi_backoff: u8,
325325
pub tcpi_options: u8,
326-
/*
327-
* FIXME(musl): enable on all targets once musl headers are more up to date
328-
*/
329326
/// This contains the bitfields `tcpi_snd_wscale` and `tcpi_rcv_wscale`.
330327
/// Each is 4 bits.
331-
#[cfg(target_arch = "loongarch64")]
332328
pub tcpi_snd_rcv_wscale: u8,
333329
/// This contains the bitfields `tcpi_delivery_rate_app_limited` (1 bit) and
334330
/// `tcpi_fastopen_client_fail` (2 bits).
335-
#[cfg(target_arch = "loongarch64")]
336331
pub tcpi_delivery_fastopen_bitfields: u8,
337332
pub tcpi_rto: u32,
338333
pub tcpi_ato: u32,
@@ -378,10 +373,7 @@ s! {
378373
pub tcpi_bytes_retrans: u64,
379374
pub tcpi_dsack_dups: u32,
380375
pub tcpi_reord_seen: u32,
381-
// FIXME(musl): enable on all targets once CI musl is updated
382-
#[cfg(target_arch = "loongarch64")]
383376
pub tcpi_rcv_ooopack: u32,
384-
#[cfg(target_arch = "loongarch64")]
385377
pub tcpi_snd_wnd: u32,
386378
}
387379

0 commit comments

Comments
 (0)