@@ -3617,6 +3617,8 @@ fn test_linux(target: &str) {
36173617 "linux/netlink.h" ,
36183618 // FIXME: requires Linux >= 5.6:
36193619 [ !musl] : "linux/openat2.h" ,
3620+ // FIXME: some items require Linux >= 5.6:
3621+ "linux/ptp_clock.h" ,
36203622 [ !musl] : "linux/ptrace.h" ,
36213623 "linux/quota.h" ,
36223624 "linux/random.h" ,
@@ -3766,6 +3768,11 @@ fn test_linux(target: &str) {
37663768 return true ;
37673769 }
37683770
3771+ // FIXME: CI has old headers
3772+ if ty == "ptp_sys_offset_extended" {
3773+ return true ;
3774+ }
3775+
37693776 // LFS64 types have been removed in musl 1.2.4+
37703777 if musl && ( ty. ends_with ( "64" ) || ty. ends_with ( "64_t" ) ) {
37713778 return true ;
@@ -3881,12 +3888,25 @@ fn test_linux(target: &str) {
38813888
38823889 // FIXME: Requires >= 5.4 kernel headers.
38833890 // Everything that uses install-musl.sh has 4.19 kernel headers.
3884- "xdp_umem_reg" | "xdp_ring_offset" | "xdp_mmap_offsets" if musl => true ,
3891+ "xdp_ring_offset" | "xdp_mmap_offsets" if musl => true ,
3892+
3893+ // FIXME: Requires >= 6.8 kernel headers.
3894+ // A field was added in 6.8.
3895+ // https://github.com/torvalds/linux/commit/341ac980eab90ac1f6c22ee9f9da83ed9604d899
3896+ // The previous version of the struct was removed in 6.11 due to a bug.
3897+ // https://github.com/torvalds/linux/commit/32654bbd6313b4cfc82297e6634fa9725c3c900f
3898+ "xdp_umem_reg" => true ,
38853899
38863900 // FIXME: Requires >= 5.9 kernel headers.
38873901 // Everything that uses install-musl.sh has 4.19 kernel headers.
38883902 "xdp_statistics" if musl => true ,
38893903
3904+ // FIXME: Requires >= 6.8 kernel headers.
3905+ "xsk_tx_metadata"
3906+ | "__c_anonymous_xsk_tx_metadata_union"
3907+ | "xsk_tx_metadata_request"
3908+ | "xsk_tx_metadata_completion" => true ,
3909+
38903910 // A new field was added in kernel 5.4, this is the old version for backwards compatibility.
38913911 // https://github.com/torvalds/linux/commit/77cd0d7b3f257fd0e3096b4fdcff1a7d38e99e10
38923912 "xdp_ring_offset_v1" | "xdp_mmap_offsets_v1" => true ,
@@ -3961,6 +3981,22 @@ fn test_linux(target: &str) {
39613981 {
39623982 return true ;
39633983 }
3984+ // FIXME: Requires >= 4.20 kernel headers
3985+ if name == "PTP_SYS_OFFSET_EXTENDED" {
3986+ return true ;
3987+ }
3988+ // FIXME: Requires >= 5.4 kernel headers
3989+ if name == "PTP_ENABLE_PPS2"
3990+ || name == "PTP_EXTTS_REQUEST2"
3991+ || name == "PTP_PEROUT_REQUEST2"
3992+ || name == "PTP_PIN_GETFUNC2"
3993+ || name == "PTP_PIN_SETFUNC2"
3994+ || name == "PTP_SYS_OFFSET2"
3995+ || name == "PTP_SYS_OFFSET_PRECISE2"
3996+ || name == "PTP_SYS_OFFSET_EXTENDED2"
3997+ {
3998+ return true ;
3999+ }
39644000 // FIXME: Requires >= 5.4.1 kernel headers
39654001 if name. starts_with ( "J1939" )
39664002 || name. starts_with ( "RTEXT_FILTER_" )
@@ -4315,6 +4351,23 @@ fn test_linux(target: &str) {
43154351 true
43164352 }
43174353
4354+ // FIXME: Requires >= 6.8 kernel headers.
4355+ "XDP_UMEM_TX_SW_CSUM"
4356+ | "XDP_TXMD_FLAGS_TIMESTAMP"
4357+ | "XDP_TXMD_FLAGS_CHECKSUM"
4358+ | "XDP_TX_METADATA"
4359+ =>
4360+ {
4361+ true
4362+ }
4363+
4364+ // FIXME: Requires >= 6.11 kernel headers.
4365+ "XDP_UMEM_TX_METADATA_LEN"
4366+ =>
4367+ {
4368+ true
4369+ }
4370+
43184371 // FIXME: Requires >= 6.6 kernel headers.
43194372 "SYS_fchmodat2" => true ,
43204373
@@ -4490,7 +4543,11 @@ fn test_linux(target: &str) {
44904543 // `__exit_status` type is a patch which is absent in musl
44914544 ( struct_ == "utmpx" && field == "ut_exit" && musl) ||
44924545 // `can_addr` is an anonymous union
4493- ( struct_ == "sockaddr_can" && field == "can_addr" )
4546+ ( struct_ == "sockaddr_can" && field == "can_addr" ) ||
4547+ // `anonymous_1` is an anonymous union
4548+ ( struct_ == "ptp_perout_request" && field == "anonymous_1" ) ||
4549+ // `anonymous_2` is an anonymous union
4550+ ( struct_ == "ptp_perout_request" && field == "anonymous_2" )
44944551 } ) ;
44954552
44964553 cfg. volatile_item ( |i| {
@@ -4561,11 +4618,17 @@ fn test_linux(target: &str) {
45614618 ( struct_ == "fanotify_event_info_fid" && field == "fsid" ) ||
45624619 // `handle` is a VLA
45634620 ( struct_ == "fanotify_event_info_fid" && field == "handle" ) ||
4621+ // `anonymous_1` is an anonymous union
4622+ ( struct_ == "ptp_perout_request" && field == "anonymous_1" ) ||
4623+ // `anonymous_2` is an anonymous union
4624+ ( struct_ == "ptp_perout_request" && field == "anonymous_2" ) ||
45644625 // invalid application of 'sizeof' to incomplete type 'long unsigned int[]'
45654626 ( musl && struct_ == "mcontext_t" && field == "__extcontext" && loongarch64) ||
45664627 // FIXME(#4121): a new field was added from `f_spare`
45674628 ( struct_ == "statvfs" && field == "__f_spare" ) ||
4568- ( struct_ == "statvfs64" && field == "__f_spare" )
4629+ ( struct_ == "statvfs64" && field == "__f_spare" ) ||
4630+ // the `xsk_tx_metadata_union` field is an anonymous union
4631+ ( struct_ == "xsk_tx_metadata" && field == "xsk_tx_metadata_union" )
45694632 } ) ;
45704633
45714634 cfg. skip_roundtrip ( move |s| match s {
0 commit comments