Skip to content

Commit 6f170ef

Browse files
committed
Prevent testing linux/if.h definitions on musl targets
1 parent 121795e commit 6f170ef

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

libc-test/build.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn main() {
9191
cfg.header("sys/mman.h");
9292
cfg.header("sys/resource.h");
9393
cfg.header("sys/socket.h");
94-
if linux {
94+
if linux && !musl {
9595
cfg.header("linux/if.h");
9696
}
9797
cfg.header("sys/time.h");
@@ -665,8 +665,10 @@ fn main() {
665665
} else {
666666
cfg.header("linux/fcntl.h");
667667
}
668-
cfg.header("net/if.h");
669-
cfg.header("linux/if.h");
668+
if !musl {
669+
cfg.header("net/if.h");
670+
cfg.header("linux/if.h");
671+
}
670672
cfg.header("linux/quota.h");
671673
cfg.skip_const(move |name| {
672674
match name {

0 commit comments

Comments
 (0)