Skip to content

Commit f05f950

Browse files
Berrysofttgross35
authored andcommitted
Fix test on cygwin
And fill semver file for cygwin. (backport <#4357>) (cherry picked from commit 5c8804b)
1 parent 5875016 commit f05f950

File tree

5 files changed

+872
-18
lines changed

5 files changed

+872
-18
lines changed

libc-test/build.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn src_hotfix_dir() -> PathBuf {
1313

1414
fn do_cc() {
1515
let target = env::var("TARGET").unwrap();
16-
if cfg!(unix) {
16+
if cfg!(unix) || target.contains("cygwin") {
1717
let exclude = ["redox", "wasi", "wali"];
1818
if !exclude.iter().any(|x| target.contains(x)) {
1919
let mut cmsg = cc::Build::new();
@@ -700,6 +700,7 @@ fn test_cygwin(target: &str) {
700700
"dlfcn.h",
701701
"errno.h",
702702
"fcntl.h",
703+
"fnmatch.h",
703704
"grp.h",
704705
"iconv.h",
705706
"langinfo.h",
@@ -710,11 +711,13 @@ fn test_cygwin(target: &str) {
710711
"netinet/tcp.h",
711712
"poll.h",
712713
"pthread.h",
714+
"pty.h",
713715
"pwd.h",
714716
"resolv.h",
715717
"sched.h",
716718
"semaphore.h",
717719
"signal.h",
720+
"spawn.h",
718721
"stddef.h",
719722
"stdlib.h",
720723
"string.h",
@@ -734,6 +737,7 @@ fn test_cygwin(target: &str) {
734737
"sys/uio.h",
735738
"sys/un.h",
736739
"sys/utsname.h",
740+
"sys/vfs.h",
737741
"syslog.h",
738742
"termios.h",
739743
"unistd.h",
@@ -853,7 +857,7 @@ fn test_cygwin(target: &str) {
853857
}
854858
});
855859

856-
cfg.generate("../src/lib.rs", "main.rs");
860+
cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
857861
}
858862

859863
fn test_windows(target: &str) {

0 commit comments

Comments
 (0)