From aa08592255c39ee99d32fffae78007a842293c0d Mon Sep 17 00:00:00 2001 From: Reagan Bohan Date: Thu, 1 May 2025 11:20:37 +0000 Subject: [PATCH] musl: fix test build with musl 1.2.0+ Since musl 1.2.0, the utmpx.ut_session type changed from long to int (with padding). For now, skip the test for this field. Fixes: 3305 --- libc-test/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index edb1556c2d6d6..3f7857fe69ff1 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -4795,7 +4795,9 @@ fn test_linux(target: &str) { (struct_ == "statvfs" && field == "__f_spare") || (struct_ == "statvfs64" && field == "__f_spare") || // the `xsk_tx_metadata_union` field is an anonymous union - (struct_ == "xsk_tx_metadata" && field == "xsk_tx_metadata_union") + (struct_ == "xsk_tx_metadata" && field == "xsk_tx_metadata_union") || + // FIXME(musl): After musl 1.2.0, the type becomes `int` instead of `long`. + (struct_ == "utmpx" && field == "ut_session") }); cfg.skip_roundtrip(move |s| match s {