@@ -3617,6 +3617,8 @@ fn test_linux(target: &str) {
3617
3617
"linux/netlink.h" ,
3618
3618
// FIXME: requires Linux >= 5.6:
3619
3619
[ !musl] : "linux/openat2.h" ,
3620
+ // FIXME: some items require Linux >= 5.6:
3621
+ "linux/ptp_clock.h" ,
3620
3622
[ !musl] : "linux/ptrace.h" ,
3621
3623
"linux/quota.h" ,
3622
3624
"linux/random.h" ,
@@ -3766,6 +3768,11 @@ fn test_linux(target: &str) {
3766
3768
return true ;
3767
3769
}
3768
3770
3771
+ // FIXME: CI has old headers
3772
+ if ty == "ptp_sys_offset_extended" {
3773
+ return true ;
3774
+ }
3775
+
3769
3776
// LFS64 types have been removed in musl 1.2.4+
3770
3777
if musl && ( ty. ends_with ( "64" ) || ty. ends_with ( "64_t" ) ) {
3771
3778
return true ;
@@ -3881,12 +3888,25 @@ fn test_linux(target: &str) {
3881
3888
3882
3889
// FIXME: Requires >= 5.4 kernel headers.
3883
3890
// 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 ,
3885
3899
3886
3900
// FIXME: Requires >= 5.9 kernel headers.
3887
3901
// Everything that uses install-musl.sh has 4.19 kernel headers.
3888
3902
"xdp_statistics" if musl => true ,
3889
3903
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
+
3890
3910
// A new field was added in kernel 5.4, this is the old version for backwards compatibility.
3891
3911
// https://github.com/torvalds/linux/commit/77cd0d7b3f257fd0e3096b4fdcff1a7d38e99e10
3892
3912
"xdp_ring_offset_v1" | "xdp_mmap_offsets_v1" => true ,
@@ -3961,6 +3981,22 @@ fn test_linux(target: &str) {
3961
3981
{
3962
3982
return true ;
3963
3983
}
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
+ }
3964
4000
// FIXME: Requires >= 5.4.1 kernel headers
3965
4001
if name. starts_with ( "J1939" )
3966
4002
|| name. starts_with ( "RTEXT_FILTER_" )
@@ -4315,6 +4351,23 @@ fn test_linux(target: &str) {
4315
4351
true
4316
4352
}
4317
4353
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
+
4318
4371
// FIXME: Requires >= 6.6 kernel headers.
4319
4372
"SYS_fchmodat2" => true ,
4320
4373
@@ -4490,7 +4543,11 @@ fn test_linux(target: &str) {
4490
4543
// `__exit_status` type is a patch which is absent in musl
4491
4544
( struct_ == "utmpx" && field == "ut_exit" && musl) ||
4492
4545
// `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" )
4494
4551
} ) ;
4495
4552
4496
4553
cfg. volatile_item ( |i| {
@@ -4561,11 +4618,17 @@ fn test_linux(target: &str) {
4561
4618
( struct_ == "fanotify_event_info_fid" && field == "fsid" ) ||
4562
4619
// `handle` is a VLA
4563
4620
( 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" ) ||
4564
4625
// invalid application of 'sizeof' to incomplete type 'long unsigned int[]'
4565
4626
( musl && struct_ == "mcontext_t" && field == "__extcontext" && loongarch64) ||
4566
4627
// FIXME(#4121): a new field was added from `f_spare`
4567
4628
( 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" )
4569
4632
} ) ;
4570
4633
4571
4634
cfg. skip_roundtrip ( move |s| match s {
0 commit comments