@@ -3315,16 +3315,10 @@ fn test_linux(target: &str) {
3315
3315
"Ioctl" if gnu => "unsigned long" . to_string ( ) ,
3316
3316
"Ioctl" => "int" . to_string ( ) ,
3317
3317
3318
- t if is_union => format ! ( "union {}" , t) ,
3319
-
3318
+ // `_t` is already a typedef, no need for a keyword
3320
3319
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
3321
-
3322
- // In MUSL `xxx64` is a typedef to `xxx`.
3323
- "flock64" if musl => format ! ( "struct {}" , ty) ,
3324
- "dirent64" if musl => format ! ( "struct {}" , ty) ,
3325
- "rlimit64" if musl => format ! ( "struct {}" , ty) ,
3326
- "fpos64_t" if musl => format ! ( "struct {}" , ty) ,
3327
-
3320
+ // put `union` in front of all unions:
3321
+ t if is_union => format ! ( "union {}" , t) ,
3328
3322
// put `struct` in front of all structs:.
3329
3323
t if is_struct => format ! ( "struct {}" , t) ,
3330
3324
@@ -3383,7 +3377,11 @@ fn test_linux(target: &str) {
3383
3377
"priority_t" if musl => true ,
3384
3378
"name_t" if musl => true ,
3385
3379
3386
- _ => false ,
3380
+ t => if musl {
3381
+ t. ends_with ( "64" ) || t. ends_with ( "64_t" )
3382
+ } else {
3383
+ false
3384
+ }
3387
3385
}
3388
3386
} ) ;
3389
3387
0 commit comments