Skip to content

Commit 5719564

Browse files
committed
Tidy up build.rs now that all xxx64 are absent for the musl target
1 parent cd78c71 commit 5719564

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

libc-test/build.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3315,16 +3315,10 @@ fn test_linux(target: &str) {
33153315
"Ioctl" if gnu => "unsigned long".to_string(),
33163316
"Ioctl" => "int".to_string(),
33173317

3318-
t if is_union => format!("union {}", t),
3319-
3318+
// `_t` is already a typedef, no need for a keyword
33203319
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),
33283322
// put `struct` in front of all structs:.
33293323
t if is_struct => format!("struct {}", t),
33303324

@@ -3383,7 +3377,11 @@ fn test_linux(target: &str) {
33833377
"priority_t" if musl => true,
33843378
"name_t" if musl => true,
33853379

3386-
_ => false,
3380+
t => if musl {
3381+
t.ends_with("64") || t.ends_with("64_t")
3382+
} else {
3383+
false
3384+
}
33873385
}
33883386
});
33893387

0 commit comments

Comments
 (0)