Skip to content

Commit 0581f92

Browse files
committed
add exception for msvc
1 parent e92ed6d commit 0581f92

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libc-test/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ fn main() {
1111
let x86_64 = target.contains("x86_64");
1212
let x32 = target.ends_with("gnux32");
1313
let windows = target.contains("windows");
14+
let msvc = target.contains("windows-msvc");
1415
let mingw = target.contains("windows-gnu");
1516
let linux = target.contains("unknown-linux");
1617
let android = target.contains("android");
@@ -712,6 +713,9 @@ fn main() {
712713
s if ios && s.starts_with("RTV_") => true,
713714
s if ios && s.starts_with("DLT_") => true,
714715

716+
// these constants do not exist in msvc, but they are still useful
717+
"STDIN_FILENO" | "STDOUT_FILENO" | "STDERR_FILENO" if msvc => true,
718+
715719
_ => false,
716720
}
717721
});

0 commit comments

Comments
 (0)