File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 3636
3737#![ feature( asm) ]
3838#![ feature( fnbox) ]
39- #![ cfg_attr( unix, feature( libc) ) ]
39+ #![ cfg_attr( any ( unix, target_os = "cloudabi" ) , feature( libc) ) ]
4040#![ feature( set_stdio) ]
4141#![ feature( panic_unwind) ]
4242#![ feature( staged_api) ]
4343
4444extern crate getopts;
4545extern crate term;
46- #[ cfg( unix) ]
46+ #[ cfg( any ( unix, target_os = "cloudabi" ) ) ]
4747extern crate libc;
4848extern crate panic_unwind;
4949
@@ -1191,13 +1191,14 @@ fn get_concurrency() -> usize {
11911191 1
11921192 }
11931193
1194- #[ cfg( any( target_os = "linux" ,
1195- target_os = "macos" ,
1196- target_os = "ios" ,
1197- target_os = "android" ,
1198- target_os = "solaris" ,
1194+ #[ cfg( any( target_os = "android" ,
1195+ target_os = "cloudabi" ,
11991196 target_os = "emscripten" ,
1200- target_os = "fuchsia" ) ) ]
1197+ target_os = "fuchsia" ,
1198+ target_os = "ios" ,
1199+ target_os = "linux" ,
1200+ target_os = "macos" ,
1201+ target_os = "solaris" ) ) ]
12011202 fn num_cpus ( ) -> usize {
12021203 unsafe { libc:: sysconf ( libc:: _SC_NPROCESSORS_ONLN) as usize }
12031204 }
You can’t perform that action at this time.
0 commit comments