File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 36
36
37
37
#![ feature( asm) ]
38
38
#![ feature( fnbox) ]
39
- #![ cfg_attr( unix, feature( libc) ) ]
39
+ #![ cfg_attr( any ( unix, target_os = "cloudabi" ) , feature( libc) ) ]
40
40
#![ feature( set_stdio) ]
41
41
#![ feature( panic_unwind) ]
42
42
#![ feature( staged_api) ]
43
43
44
44
extern crate getopts;
45
45
extern crate term;
46
- #[ cfg( unix) ]
46
+ #[ cfg( any ( unix, target_os = "cloudabi" ) ) ]
47
47
extern crate libc;
48
48
extern crate panic_unwind;
49
49
@@ -1191,13 +1191,14 @@ fn get_concurrency() -> usize {
1191
1191
1
1192
1192
}
1193
1193
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" ,
1199
1196
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" ) ) ]
1201
1202
fn num_cpus ( ) -> usize {
1202
1203
unsafe { libc:: sysconf ( libc:: _SC_NPROCESSORS_ONLN) as usize }
1203
1204
}
You can’t perform that action at this time.
0 commit comments