@@ -13,7 +13,7 @@ fn src_hotfix_dir() -> PathBuf {
1313
1414fn 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
859863fn test_windows ( target : & str ) {
@@ -1049,6 +1053,13 @@ fn test_solarish(target: &str) {
10491053 cfg. define ( "__EXTENSIONS__" , None ) ;
10501054 cfg. define ( "_LCONV_C99" , None ) ;
10511055
1056+ // FIXME(solaris): This should be removed once new Nix crate is released.
1057+ // See comment in src/unix/solarish/solaris.rs for these.
1058+ if is_solaris {
1059+ cfg. define ( "O_DIRECT" , Some ( "0x2000000" ) ) ;
1060+ cfg. define ( "SIGINFO" , Some ( "41" ) ) ;
1061+ }
1062+
10521063 headers ! {
10531064 cfg:
10541065 "aio.h" ,
@@ -1307,6 +1318,10 @@ fn test_solarish(target: &str) {
13071318 // https://github.com/gnzlbg/ctest/issues/68
13081319 "lio_listio" => true ,
13091320
1321+ // Exists on illumos too but, for now, is
1322+ // [a recent addition](https://www.illumos.org/issues/17094).
1323+ "secure_getenv" if is_illumos => true ,
1324+
13101325 _ => false ,
13111326 }
13121327 } ) ;
@@ -4136,8 +4151,7 @@ fn test_linux(target: &str) {
41364151 "epoll_params" => true ,
41374152
41384153 // FIXME(linux): Requires >= 6.12 kernel headers.
4139- "dmabuf_cmsg" |
4140- "dmabuf_token" => true ,
4154+ "dmabuf_cmsg" | "dmabuf_token" => true ,
41414155
41424156 _ => false ,
41434157 }
0 commit comments