@@ -3168,7 +3168,6 @@ fn test_linux(target: &str) {
3168
3168
"netinet/ip.h" ,
3169
3169
"netinet/tcp.h" ,
3170
3170
"netinet/udp.h" ,
3171
- "netpacket/packet.h" ,
3172
3171
"poll.h" ,
3173
3172
"pthread.h" ,
3174
3173
"pty.h" ,
@@ -3267,6 +3266,7 @@ fn test_linux(target: &str) {
3267
3266
"linux/if_addr.h" ,
3268
3267
"linux/if_alg.h" ,
3269
3268
"linux/if_ether.h" ,
3269
+ "linux/if_packet.h" ,
3270
3270
"linux/if_tun.h" ,
3271
3271
"linux/input.h" ,
3272
3272
"linux/ipv6.h" ,
@@ -3405,6 +3405,42 @@ fn test_linux(target: &str) {
3405
3405
if ( musl || sparc64) && ty. starts_with ( "uinput_" ) {
3406
3406
return true ;
3407
3407
}
3408
+
3409
+ // FIXME: sparc64 and musl CI images are big endian, which doesn't play well with structs that are not multiples of 32 or 64 bits
3410
+ if ( musl || sparc64) && ty == "sockaddr_pkt" {
3411
+ return true ;
3412
+ }
3413
+
3414
+ // FIXME: sparc64 is 64-bit big endian, which doesn't play well with structs that are not multiples of 64 bits
3415
+ if sparc64 && ty == "tpacket_auxdata" {
3416
+ return true ;
3417
+ }
3418
+
3419
+ // FIXME: sparc64 is 64-bit big endian, which doesn't play well with structs that are not multiples of 64 bits
3420
+ if sparc64 && ty == "tpacket_hdr_variant1" {
3421
+ return true ;
3422
+ }
3423
+
3424
+ // FIXME: sparc64 is 64-bit big endian, which doesn't play well with structs that are not multiples of 64 bits
3425
+ if sparc64 && ty == "tpacket_req3" {
3426
+ return true ;
3427
+ }
3428
+
3429
+ // FIXME: sparc64 is 64-bit big endian, which doesn't play well with structs that are not multiples of 64 bits
3430
+ if sparc64 && ty == "tpacket_stats_v3" {
3431
+ return true ;
3432
+ }
3433
+
3434
+ // FIXME: sparc64 is 64-bit big endian, which doesn't play well with structs that are not multiples of 64 bits
3435
+ if sparc64 && ty == "tpacket_req_u" {
3436
+ return true ;
3437
+ }
3438
+
3439
+ // FIXME: sparc64 is 64-bit big endian, which doesn't play well with structs that are not multiples of 64 bits
3440
+ if sparc64 && ty == "tpacket3_hdr" {
3441
+ return true ;
3442
+ }
3443
+
3408
3444
// FIXME(https://github.com/rust-lang/libc/issues/1558): passing by
3409
3445
// value corrupts the value for reasons not understood.
3410
3446
if ( gnu && sparc64) && ( ty == "ip_mreqn" || ty == "hwtstamp_config" ) {
@@ -3423,6 +3459,9 @@ fn test_linux(target: &str) {
3423
3459
// FIXME: This is actually a union, not a struct
3424
3460
"sigval" => true ,
3425
3461
3462
+ // FIXME: remove these once musl/sparc64 CI versions are upgraded (currently not a recognized struct)
3463
+ "fanout_args" if musl || sparc64 => true ,
3464
+
3426
3465
// This type is tested in the `linux_termios.rs` file since there
3427
3466
// are header conflicts when including them with all the other
3428
3467
// structs.
@@ -3641,6 +3680,9 @@ fn test_linux(target: &str) {
3641
3680
// present in recent kernels only >= 5.19
3642
3681
"PR_SME_SET_VL" | "PR_SME_GET_VL" | "PR_SME_VL_LEN_MAX" | "PR_SME_SET_VL_INHERIT" | "PR_SME_SET_VL_ONE_EXEC" => true ,
3643
3682
3683
+ // FIXME: Alignment issues with tpacket3_hdr struct
3684
+ "TPACKET3_HDRLEN" if sparc64 => true ,
3685
+
3644
3686
// Added in Linux 5.14
3645
3687
"FUTEX_LOCK_PI2" => true ,
3646
3688
@@ -3929,6 +3971,10 @@ fn test_linux(target: &str) {
3929
3971
( struct_ == "sockaddr_vm" && field == "svm_zero" ) ||
3930
3972
// the `ifr_ifru` field is an anonymous union
3931
3973
( struct_ == "ifreq" && field == "ifr_ifru" ) ||
3974
+ // the `hdr_variant` field is an anonymous union
3975
+ ( struct_ == "tpacket3_hdr" && field == "hdr_variant" ) ||
3976
+ // the `ts_subsec` field is an anonymous union
3977
+ ( struct_ == "tpacket_bd_ts" && field == "ts_subsec" ) ||
3932
3978
// glibc uses a single array `uregs` instead of individual fields.
3933
3979
( struct_ == "user_regs" && arm)
3934
3980
} ) ;
0 commit comments