Skip to content

Commit fb4212a

Browse files
committed
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.
1 parent 1038c7f commit fb4212a

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
@@ -4131,6 +4131,9 @@ fn test_linux(target: &str) {
41314131
// FIXME(linux): Requires >= 6.4 kernel headers.
41324132
"ptrace_sud_config" => true,
41334133

4134+
// Struct has changed for new musl versions
4135+
"tcp_info" if old_musl => true,
4136+
41344137
_ => false,
41354138
}
41364139
});

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,11 @@ s! {
303303
pub tcpi_probes: u8,
304304
pub tcpi_backoff: u8,
305305
pub tcpi_options: u8,
306-
/*
307-
* FIXME(musl): enable on all targets once musl headers are more up to date
308-
*/
309306
/// This contains the bitfields `tcpi_snd_wscale` and `tcpi_rcv_wscale`.
310307
/// Each is 4 bits.
311-
#[cfg(target_arch = "loongarch64")]
312308
pub tcpi_snd_rcv_wscale: u8,
313309
/// This contains the bitfields `tcpi_delivery_rate_app_limited` (1 bit) and
314310
/// `tcpi_fastopen_client_fail` (2 bits).
315-
#[cfg(target_arch = "loongarch64")]
316311
pub tcpi_delivery_fastopen_bitfields: u8,
317312
pub tcpi_rto: u32,
318313
pub tcpi_ato: u32,
@@ -358,10 +353,7 @@ s! {
358353
pub tcpi_bytes_retrans: u64,
359354
pub tcpi_dsack_dups: u32,
360355
pub tcpi_reord_seen: u32,
361-
// FIXME(musl): enable on all targets once CI musl is updated
362-
#[cfg(target_arch = "loongarch64")]
363356
pub tcpi_rcv_ooopack: u32,
364-
#[cfg(target_arch = "loongarch64")]
365357
pub tcpi_snd_wnd: u32,
366358
}
367359

0 commit comments

Comments
 (0)