@@ -1409,7 +1409,7 @@ fn test_dragonflybsd(target: &str) {
1409
1409
// just insert some padding.
1410
1410
( struct_ == "siginfo_t" && field == "_pad" ) ||
1411
1411
// sigev_notify_thread_id is actually part of a sigev_un union
1412
- ( struct_ == "sigevent " && field == "sigev_notify_thread_id" )
1412
+ ( struct_ == "sigevent_0_2_126 " && field == "sigev_notify_thread_id" )
1413
1413
} ) ;
1414
1414
1415
1415
cfg. generate ( "../src/lib.rs" , "main.rs" ) ;
@@ -1645,6 +1645,8 @@ fn test_android(target: &str) {
1645
1645
// sigval is a struct in Rust, but a union in C:
1646
1646
"sigval" => format ! ( "union sigval" ) ,
1647
1647
1648
+ "sigevent_0_2_126" => "struct sigevent" . to_string ( ) ,
1649
+
1648
1650
// put `struct` in front of all structs:.
1649
1651
t if is_struct => format ! ( "struct {}" , t) ,
1650
1652
@@ -1802,8 +1804,10 @@ fn test_android(target: &str) {
1802
1804
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
1803
1805
// incorrect, see: https://github.com/rust-lang/libc/issues/1359
1804
1806
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
1805
- // sigev_notify_thread_id is actually part of a sigev_un union
1806
- ( struct_ == "sigevent" && field == "sigev_notify_thread_id" ) ||
1807
+ // union field
1808
+ ( struct_ == "sigevent" && field == "_sigev_un" ) ||
1809
+ // union field on the backwards-compat struct definition
1810
+ ( struct_ == "sigevent_0_2_126" && field == "sigev_notify_thread_id" ) ||
1807
1811
// signalfd had SIGSYS fields added in Android 4.19, but CI does not have that version yet.
1808
1812
( struct_ == "signalfd_siginfo" && ( field == "ssi_syscall" ||
1809
1813
field == "ssi_call_addr" ||
@@ -1980,6 +1984,8 @@ fn test_freebsd(target: &str) {
1980
1984
// FIXME: https://github.com/rust-lang/libc/issues/1273
1981
1985
"sighandler_t" => "sig_t" . to_string ( ) ,
1982
1986
1987
+ "sigevent_0_2_126" => "struct sigevent" . to_string ( ) ,
1988
+
1983
1989
t if is_union => format ! ( "union {}" , t) ,
1984
1990
1985
1991
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
@@ -2270,6 +2276,7 @@ fn test_freebsd(target: &str) {
2270
2276
( "if_data" , "__ifi_lastchange" ) => true ,
2271
2277
( "ifreq" , "ifr_ifru" ) => true ,
2272
2278
( "ifconf" , "ifc_ifcu" ) => true ,
2279
+ ( "sigevent" , "_sigev_un" ) => true ,
2273
2280
2274
2281
// anonymous struct
2275
2282
( "devstat" , "dev_links" ) => true ,
@@ -2409,6 +2416,8 @@ fn test_emscripten(target: &str) {
2409
2416
2410
2417
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
2411
2418
2419
+ "sigevent_0_2_126" => "struct sigevent" . to_string ( ) ,
2420
+
2412
2421
// put `struct` in front of all structs:.
2413
2422
t if is_struct => format ! ( "struct {}" , t) ,
2414
2423
@@ -2512,8 +2521,10 @@ fn test_emscripten(target: &str) {
2512
2521
// musl seems to define this as an *anonymous* bitfield
2513
2522
// FIXME: is this necessary?
2514
2523
( struct_ == "statvfs" && field == "__f_unused" ) ||
2515
- // sigev_notify_thread_id is actually part of a sigev_un union
2516
- ( struct_ == "sigevent" && field == "sigev_notify_thread_id" ) ||
2524
+ // union field
2525
+ ( struct_ == "sigevent" && field == "_sigev_un" ) ||
2526
+ // union field on the backwards-compat struct definition
2527
+ ( struct_ == "sigevent_0_2_126" && field == "sigev_notify_thread_id" ) ||
2517
2528
// signalfd had SIGSYS fields added in Linux 4.18, but no libc release has them yet.
2518
2529
( struct_ == "signalfd_siginfo" && ( field == "ssi_addr_lsb" ||
2519
2530
field == "_pad2" ||
@@ -2863,6 +2874,8 @@ fn test_linux(target: &str) {
2863
2874
// In MUSL `flock64` is a typedef to `flock`.
2864
2875
"flock64" if musl => format ! ( "struct {}" , ty) ,
2865
2876
2877
+ "sigevent_0_2_126" => "struct sigevent" . to_string ( ) ,
2878
+
2866
2879
// put `struct` in front of all structs:.
2867
2880
t if is_struct => format ! ( "struct {}" , t) ,
2868
2881
@@ -3286,6 +3299,7 @@ fn test_linux(target: &str) {
3286
3299
( struct_ == "utmpx" && field == "ut_tv" ) ||
3287
3300
// sigval is actually a union, but we pretend it's a struct
3288
3301
( struct_ == "sigevent" && field == "sigev_value" ) ||
3302
+ ( struct_ == "sigevent_0_2_126" && field == "sigev_value" ) ||
3289
3303
// this one is an anonymous union
3290
3304
( struct_ == "ff_effect" && field == "u" ) ||
3291
3305
// `__exit_status` type is a patch which is absent in musl
@@ -3312,8 +3326,10 @@ fn test_linux(target: &str) {
3312
3326
( musl && struct_ == "glob_t" && field == "gl_flags" ) ||
3313
3327
// musl seems to define this as an *anonymous* bitfield
3314
3328
( musl && struct_ == "statvfs" && field == "__f_unused" ) ||
3315
- // sigev_notify_thread_id is actually part of a sigev_un union
3316
- ( struct_ == "sigevent" && field == "sigev_notify_thread_id" ) ||
3329
+ // union field
3330
+ ( struct_ == "sigevent" && field == "_sigev_un" ) ||
3331
+ // union field on the backwards-compat struct definition
3332
+ ( struct_ == "sigevent_0_2_126" && field == "sigev_notify_thread_id" ) ||
3317
3333
// signalfd had SIGSYS fields added in Linux 4.18, but no libc release
3318
3334
// has them yet.
3319
3335
( struct_ == "signalfd_siginfo" && ( field == "ssi_addr_lsb" ||
@@ -3810,6 +3826,7 @@ fn test_haiku(target: &str) {
3810
3826
( "sem_t" , "named_sem_id" ) => true ,
3811
3827
( "sigaction" , "sa_sigaction" ) => true ,
3812
3828
( "sigevent" , "sigev_value" ) => true ,
3829
+ ( "sigevent_0_2_126" , "sigev_value" ) => true ,
3813
3830
( "fpu_state" , "_fpreg" ) => true ,
3814
3831
// these fields have a simplified data definition in libc
3815
3832
( "fpu_state" , "_xmm" ) => true ,
0 commit comments