Skip to content

Commit 6f54ce9

Browse files
committed
added _SC_NPROCESSORS_ONLN constants for linux and macos for fix rust-lang#24374
1 parent 3cac76b commit 6f54ce9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/liblibc/lib.rs

+15
Original file line numberDiff line numberDiff line change
@@ -3344,6 +3344,8 @@ pub mod consts {
33443344
pub const _SC_XOPEN_REALTIME : c_int = 130;
33453345
pub const _SC_XOPEN_REALTIME_THREADS : c_int = 131;
33463346

3347+
3348+
33473349
pub const PTHREAD_CREATE_JOINABLE: c_int = 0;
33483350
pub const PTHREAD_CREATE_DETACHED: c_int = 1;
33493351

@@ -3742,6 +3744,19 @@ pub mod consts {
37423744
pub static _SC_NPROCESSORS_ONLN : c_int = 1;
37433745
pub static _SC_PAGESIZE : c_int = 2;
37443746
}
3747+
3748+
#[cfg(target_os = "linux")]
3749+
pub mod sysconf {
3750+
use types::os::arch::c95::c_int;
3751+
pub static _SC_NPROCESSORS_ONLN : c_int = 84;
3752+
}
3753+
3754+
#[cfg(target_os = "macos")]
3755+
pub mod sysconf {
3756+
use types::os::arch::c95::c_int;
3757+
pub static _SC_NPROCESSORS_ONLN : c_int = 58;
3758+
}
3759+
37453760
#[cfg(target_os = "android")]
37463761
pub mod sysconf {
37473762
use types::os::arch::c95::c_int;

0 commit comments

Comments
 (0)