@@ -325,6 +325,9 @@ fn test_apple(target: &str) {
325325
326326 cfg. skip_struct ( move |s| {
327327 match s. ident ( ) {
328+ // Extern types
329+ "DIR" | "FILE" | "fpos_t" | "timezone" => true ,
330+
328331 // FIXME(macos): The size is changed in recent macOSes.
329332 "malloc_zone_t" => true ,
330333 // it is a moving target, changing through versions
@@ -572,6 +575,15 @@ fn test_openbsd(target: &str) {
572575 cfg. rename_struct_ty ( |ty| ty. ends_with ( "_t" ) . then_some ( ty. to_string ( ) ) ) ;
573576 cfg. rename_union_ty ( |ty| ty. ends_with ( "_t" ) . then_some ( ty. to_string ( ) ) ) ;
574577
578+ cfg. skip_struct ( move |struct_| {
579+ match struct_. ident ( ) {
580+ // Extern types
581+ "DIR" | "FILE" | "fpos_t" => true ,
582+
583+ _ => false ,
584+ }
585+ } ) ;
586+
575587 cfg. skip_struct_field ( move |struct_, field| {
576588 match ( struct_. ident ( ) , field. ident ( ) ) {
577589 // conflicting with `p_type` macro from <resolve.h>.
@@ -693,6 +705,15 @@ fn test_cygwin(target: &str) {
693705 _ => false ,
694706 } ) ;
695707
708+ cfg. skip_struct ( move |struct_| {
709+ match struct_. ident ( ) {
710+ // Extern types
711+ "DIR" | "FILE" | "fpos_t" => true ,
712+
713+ _ => false ,
714+ }
715+ } ) ;
716+
696717 cfg. rename_struct_field ( move |struct_, field| {
697718 match field. ident ( ) {
698719 // Our stat *_nsec fields normally don't actually exist but are part
@@ -828,6 +849,8 @@ fn test_windows(target: &str) {
828849 match struct_. ident ( ) {
829850 // FIXME(windows): The size and alignment of this struct are incorrect
830851 "timespec" if gnu && i686 => true ,
852+ // Extern types
853+ "FILE" | "fpos_t" | "timezone" => true ,
831854 _ => false ,
832855 }
833856 } ) ;
@@ -1089,13 +1112,16 @@ fn test_solarish(target: &str) {
10891112 false
10901113 } ) ;
10911114 cfg. skip_struct ( move |struct_| {
1092- // the union handling is a mess
1093- if struct_. ident ( ) . contains ( "door_desc_t_" ) {
1094- return true ;
1095- }
10961115 match struct_. ident ( ) {
1116+ // the union handling is a mess
1117+ x if x. contains ( "door_desc_t_" ) => true ,
1118+
10971119 // a bunch of solaris-only fields
10981120 "utmpx" if is_illumos => true ,
1121+
1122+ // Extern types
1123+ "DIR" | "FILE" | "fpos_t" | "timezone" | "ucred_t" => true ,
1124+
10991125 _ => false ,
11001126 }
11011127 } ) ;
@@ -1362,6 +1388,8 @@ fn test_netbsd(target: &str) {
13621388 "ptrace_lwpinfo" => true ,
13631389 // ABI change in NetBSD10, with symbol versioning.
13641390 "statvfs" if !netbsd9 => true ,
1391+ // Extern types
1392+ "DIR" | "FILE" | "fpos_t" | "timezone" | "_cpuset" | "sem" => true ,
13651393 _ => false ,
13661394 }
13671395 } ) ;
@@ -1647,6 +1675,9 @@ fn test_dragonflybsd(target: &str) {
16471675 // structs.
16481676 "termios2" => true ,
16491677
1678+ // Extern types
1679+ "DIR" | "FILE" | "fpos_t" => true ,
1680+
16501681 _ => false ,
16511682 }
16521683 } ) ;
@@ -1793,6 +1824,14 @@ fn test_wasi(target: &str) {
17931824 _ => false ,
17941825 } ) ;
17951826
1827+ cfg. skip_struct ( move |struct_| {
1828+ match struct_. ident ( ) {
1829+ // Extern types
1830+ "DIR" | "FILE" | "__locale_struct" => true ,
1831+ _ => false ,
1832+ }
1833+ } ) ;
1834+
17961835 cfg. skip_fn ( |f| match f. ident ( ) {
17971836 // This function doesn't actually exist in libc's header files
17981837 "__errno_location" => true ,
@@ -2041,6 +2080,9 @@ fn test_android(target: &str) {
20412080 // FIXME(android): The field has been changed:
20422081 "sockaddr_vm" => true ,
20432082
2083+ // Extern types
2084+ "DIR" | "FILE" | "fpos_t" | "timezone" => true ,
2085+
20442086 _ => false ,
20452087 }
20462088 } ) ;
@@ -2846,6 +2888,9 @@ fn test_freebsd(target: &str) {
28462888 // Those are introduced in FreeBSD 15.
28472889 "xktls_session_onedir" | "xktls_session" if Some ( 15 ) > freebsd_ver => true ,
28482890
2891+ // Extern types
2892+ "DIR" | "FILE" | "fpos_t" | "timezone" => true ,
2893+
28492894 _ => false ,
28502895 }
28512896 } ) ;
@@ -3144,6 +3189,9 @@ fn test_emscripten(target: &str) {
31443189 "pthread_condattr_t" => true ,
31453190 "pthread_mutexattr_t" => true ,
31463191
3192+ // Extern types
3193+ "DIR" | "FILE" | "fpos_t" | "fpos64_t" | "timezone" => true ,
3194+
31473195 // No epoll support
31483196 // https://github.com/emscripten-core/emscripten/issues/5033
31493197 ty if ty. starts_with ( "epoll" ) => true ,
@@ -3424,6 +3472,9 @@ fn test_neutrino(target: &str) {
34243472 // union
34253473 "_channel_connect_attr" => true ,
34263474
3475+ // Extern types
3476+ "DIR" | "FILE" | "fpos_t" => true ,
3477+
34273478 _ => false ,
34283479 }
34293480 } ) ;
@@ -4221,9 +4272,10 @@ fn test_linux(target: &str) {
42214272 // On 64 bits the size did not change, skip only for 32 bits.
42224273 "ptrace_syscall_info" if pointer_width == 32 => true ,
42234274
4275+ // not in sys/fanotify.h in uclibc
4276+ "fanotify_event_info_header" | "fanotify_event_info_fid" if uclibc => true ,
4277+
42244278 "canxl_frame"
4225- | "fanotify_event_info_header" // not in sys/fanotify.h in uclibc
4226- | "fanotify_event_info_fid" // not in sys/fanotify.h in uclibc
42274279 | "tls12_crypto_info_sm4_gcm"
42284280 | "tls12_crypto_info_sm4_ccm"
42294281 | "tls12_crypto_info_aria_gcm_128"
@@ -4233,6 +4285,9 @@ fn test_linux(target: &str) {
42334285 true
42344286 }
42354287
4288+ // Extern types
4289+ "DIR" | "FILE" | "fpos_t" | "timezone" => true ,
4290+
42364291 _ => false ,
42374292 }
42384293 } ) ;
@@ -5734,6 +5789,9 @@ fn test_aix(target: &str) {
57345789 // header.
57355790 "fileops_t" | "file" => true ,
57365791
5792+ // Extern types
5793+ "DIR" | "FILE" | "fpos_t" => true ,
5794+
57375795 _ => false ,
57385796 }
57395797 } ) ;
0 commit comments