@@ -13,7 +13,7 @@ fn src_hotfix_dir() -> PathBuf {
13
13
14
14
fn do_cc ( ) {
15
15
let target = env:: var ( "TARGET" ) . unwrap ( ) ;
16
- if cfg ! ( unix) {
16
+ if cfg ! ( unix) || target . contains ( "cygwin" ) {
17
17
let exclude = [ "redox" , "wasi" , "wali" ] ;
18
18
if !exclude. iter ( ) . any ( |x| target. contains ( x) ) {
19
19
let mut cmsg = cc:: Build :: new ( ) ;
@@ -700,6 +700,7 @@ fn test_cygwin(target: &str) {
700
700
"dlfcn.h" ,
701
701
"errno.h" ,
702
702
"fcntl.h" ,
703
+ "fnmatch.h" ,
703
704
"grp.h" ,
704
705
"iconv.h" ,
705
706
"langinfo.h" ,
@@ -710,11 +711,13 @@ fn test_cygwin(target: &str) {
710
711
"netinet/tcp.h" ,
711
712
"poll.h" ,
712
713
"pthread.h" ,
714
+ "pty.h" ,
713
715
"pwd.h" ,
714
716
"resolv.h" ,
715
717
"sched.h" ,
716
718
"semaphore.h" ,
717
719
"signal.h" ,
720
+ "spawn.h" ,
718
721
"stddef.h" ,
719
722
"stdlib.h" ,
720
723
"string.h" ,
@@ -734,6 +737,7 @@ fn test_cygwin(target: &str) {
734
737
"sys/uio.h" ,
735
738
"sys/un.h" ,
736
739
"sys/utsname.h" ,
740
+ "sys/vfs.h" ,
737
741
"syslog.h" ,
738
742
"termios.h" ,
739
743
"unistd.h" ,
@@ -853,7 +857,7 @@ fn test_cygwin(target: &str) {
853
857
}
854
858
} ) ;
855
859
856
- cfg. generate ( "../src/ lib.rs", "main.rs" ) ;
860
+ cfg. generate ( src_hotfix_dir ( ) . join ( " lib.rs") , "main.rs" ) ;
857
861
}
858
862
859
863
fn test_windows ( target : & str ) {
@@ -1049,6 +1053,13 @@ fn test_solarish(target: &str) {
1049
1053
cfg. define ( "__EXTENSIONS__" , None ) ;
1050
1054
cfg. define ( "_LCONV_C99" , None ) ;
1051
1055
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
+
1052
1063
headers ! {
1053
1064
cfg:
1054
1065
"aio.h" ,
@@ -1307,6 +1318,10 @@ fn test_solarish(target: &str) {
1307
1318
// https://github.com/gnzlbg/ctest/issues/68
1308
1319
"lio_listio" => true ,
1309
1320
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
+
1310
1325
_ => false ,
1311
1326
}
1312
1327
} ) ;
@@ -4136,8 +4151,7 @@ fn test_linux(target: &str) {
4136
4151
"epoll_params" => true ,
4137
4152
4138
4153
// FIXME(linux): Requires >= 6.12 kernel headers.
4139
- "dmabuf_cmsg" |
4140
- "dmabuf_token" => true ,
4154
+ "dmabuf_cmsg" | "dmabuf_token" => true ,
4141
4155
4142
4156
_ => false ,
4143
4157
}
0 commit comments