@@ -3290,7 +3290,7 @@ fn test_linux(target: &str) {
32903290 "linux/netfilter_ipv6/ip6_tables.h" ,
32913291 "linux/netlink.h" ,
32923292 // FIXME: requires Linux >= 5.6:
3293- [ !musl && !sparc64 ] : "linux/openat2.h" ,
3293+ [ !musl] : "linux/openat2.h" ,
32943294 [ !musl] : "linux/ptrace.h" ,
32953295 "linux/quota.h" ,
32963296 "linux/random.h" ,
@@ -3402,7 +3402,11 @@ fn test_linux(target: &str) {
34023402 return true ;
34033403 }
34043404 // FIXME: musl CI has old headers
3405- if ( musl || sparc64) && ty. starts_with ( "uinput_" ) {
3405+ if musl && ty. starts_with ( "uinput_" ) {
3406+ return true ;
3407+ }
3408+ // FIXME: sparc64 CI has old headers
3409+ if sparc64 && ( ty == "uinput_ff_erase" || ty == "uinput_abs_setup" ) {
34063410 return true ;
34073411 }
34083412 // FIXME(https://github.com/rust-lang/libc/issues/1558): passing by
@@ -3457,9 +3461,6 @@ fn test_linux(target: &str) {
34573461 // FIXME: requires >= 5.4 kernel headers
34583462 "sockaddr_can" if musl => true ,
34593463
3460- // FIXME: Unignore once we update Ubuntu to 22.04
3461- "mallinfo2" if sparc64 => true ,
3462- "ptrace_rseq_configuration" if sparc64 => true ,
34633464 "sctp_initmsg" | "sctp_sndrcvinfo" | "sctp_sndinfo" | "sctp_rcvinfo"
34643465 | "sctp_nxtinfo" | "sctp_prinfo" | "sctp_authinfo" => true ,
34653466
@@ -3504,7 +3505,7 @@ fn test_linux(target: &str) {
35043505 return true ;
35053506 }
35063507 }
3507- if musl || sparc64 {
3508+ if musl {
35083509 // FIXME: Requires >= 5.4.1 kernel headers
35093510 if name. starts_with ( "J1939" )
35103511 || name. starts_with ( "RTEXT_FILTER_" )
@@ -3601,7 +3602,7 @@ fn test_linux(target: &str) {
36013602 | "UINPUT_VERSION"
36023603 | "SW_MAX"
36033604 | "SW_CNT"
3604- if mips || ppc64 || riscv64 || sparc64 => true ,
3605+ if mips || ppc64 || riscv64 => true ,
36053606
36063607 // FIXME: Not currently available in headers on ARM, MIPS and musl.
36073608 "NETLINK_GET_STRICT_CHK" if arm || mips || musl => true ,
@@ -3670,24 +3671,24 @@ fn test_linux(target: &str) {
36703671 | "RESOLVE_IN_ROOT"
36713672 | "RESOLVE_NO_MAGICLINKS"
36723673 | "RESOLVE_NO_SYMLINKS"
3673- | "RESOLVE_NO_XDEV" if musl || sparc64 => true ,
3674+ | "RESOLVE_NO_XDEV" if musl => true ,
36743675
36753676 // FIXME: requires Linux >= 5.4:
36763677 | "CAN_J1939"
3677- | "CAN_NPROTO" if musl || sparc64 => true ,
3678+ | "CAN_NPROTO" if musl => true ,
36783679
36793680 // FIXME: requires Linux >= 5.6
3680- "GRND_INSECURE" if musl || sparc64 => true ,
3681+ "GRND_INSECURE" if musl => true ,
36813682
36823683 // FIXME: requires Linux >= 5.7:
3683- "MREMAP_DONTUNMAP" if musl || sparc64 => true ,
3684+ "MREMAP_DONTUNMAP" if musl => true ,
36843685
36853686 // FIXME: Requires more recent kernel headers (5.9 / 5.11):
36863687 | "CLOSE_RANGE_UNSHARE"
3687- | "CLOSE_RANGE_CLOEXEC" if musl || sparc64 => true ,
3688+ | "CLOSE_RANGE_CLOEXEC" if musl => true ,
36883689
36893690 // FIXME: requires Linux >= 5.12:
3690- "MPOL_F_NUMA_BALANCING" if musl || sparc64 => true ,
3691+ "MPOL_F_NUMA_BALANCING" if musl => true ,
36913692
36923693 // FIXME: Requires more recent kernel headers
36933694 | "NFNL_SUBSYS_COUNT" // bumped in v5.14
@@ -3699,39 +3700,13 @@ fn test_linux(target: &str) {
36993700 | "NFULA_VLAN_UNSPEC" // v5.4+
37003701 | "RTNLGRP_NEXTHOP" // linux v5.3+
37013702 | "RTNLGRP_BRVLAN" // linux v5.6+
3702- if musl || sparc64 => true ,
3703-
3704- // FIXME: Unignore once we update Ubuntu to 22.04
3705- | "VMADDR_CID_LOCAL"
3706- | "STATX_MNT_ID"
3707- | "SYS_close_range"
3708- | "SYS_openat2"
3709- | "SYS_pidfd_getfd"
3710- | "SYS_faccessat2"
3711- | "SYS_process_madvise"
3712- | "SYS_epoll_pwait2"
3713- | "SYS_mount_setattr"
3714- | "SYS_quotactl_fd"
3715- | "SYS_landlock_create_ruleset"
3716- | "SYS_landlock_add_rule"
3717- | "SYS_landlock_restrict_self"
3718- | "SYS_process_mrelease"
3719- | "IFLA_PROP_LIST"
3720- | "IFLA_ALT_IFNAME"
3721- | "IFLA_PERM_ADDRESS"
3722- | "IFLA_PROTO_DOWN_REASON"
3723- | "STATX_ATTR_MOUNT_ROOT"
3724- | "STATX_ATTR_VERITY"
3725- | "STATX_ATTR_DAX"
3726- if sparc64 => true ,
3727- // Added in Linux 5.13
3728- "PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true ,
3703+ if musl => true ,
37293704
37303705 | "MADV_COLD"
37313706 | "MADV_PAGEOUT"
37323707 | "MADV_POPULATE_READ"
37333708 | "MADV_POPULATE_WRITE"
3734- if sparc64 || musl => true ,
3709+ if musl => true ,
37353710
37363711 // FIXME: Requires more recent kernel headers
37373712 | "IFLA_PARENT_DEV_NAME" // linux v5.13+
@@ -3745,7 +3720,7 @@ fn test_linux(target: &str) {
37453720 "SCTP_FUTURE_ASSOC" | "SCTP_CURRENT_ASSOC" | "SCTP_ALL_ASSOC" | "SCTP_PEER_ADDR_THLDS_V2" => true , // linux 5.5+
37463721
37473722 // FIXME: Requires more recent kernel headers
3748- "HWTSTAMP_TX_ONESTEP_P2P" if sparc64 || musl => true , // linux v5.6+
3723+ "HWTSTAMP_TX_ONESTEP_P2P" if musl => true , // linux v5.6+
37493724
37503725 _ => false ,
37513726 }
@@ -3939,6 +3914,8 @@ fn test_linux(target: &str) {
39393914 "fpreg_t" if s390x => true ,
39403915
39413916 "sockaddr_un" | "sembuf" | "ff_constant_effect" if mips32 && ( gnu || musl) => true ,
3917+
3918+ // The test doesn't work on some env:
39423919 "ipv6_mreq"
39433920 | "ip_mreq_source"
39443921 | "sockaddr_in6"
0 commit comments