Skip to content

Commit 263314e

Browse files
committed
rollup merge of #24376: lambdaburrito/master
Values for `_SC_*` are not the same value between `macos` and `linux` so I've added specific target constants for Mac OS X and added `_SC_NPROCESSORS_ONLN` for `linux` and `macos`. Closes #24374
2 parents c24e55b + 883bb65 commit 263314e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/liblibc/lib.rs

Lines changed: 11 additions & 0 deletions
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

@@ -3727,12 +3729,14 @@ pub mod consts {
37273729
pub const _SC_2_FORT_RUN : c_int = 50;
37283730
pub const _SC_2_SW_DEV : c_int = 51;
37293731
pub const _SC_2_LOCALEDEF : c_int = 52;
3732+
pub const _SC_NPROCESSORS_ONLN : c_int = 84;
37303733
pub const _SC_2_CHAR_TERM : c_int = 95;
37313734
pub const _SC_2_C_VERSION : c_int = 96;
37323735
pub const _SC_2_UPE : c_int = 97;
37333736
pub const _SC_XBS5_ILP32_OFF32 : c_int = 125;
37343737
pub const _SC_XBS5_ILP32_OFFBIG : c_int = 126;
37353738
pub const _SC_XBS5_LPBIG_OFFBIG : c_int = 128;
3739+
37363740
}
37373741
#[cfg(target_os = "nacl")]
37383742
pub mod sysconf {
@@ -3742,6 +3746,13 @@ pub mod consts {
37423746
pub static _SC_NPROCESSORS_ONLN : c_int = 1;
37433747
pub static _SC_PAGESIZE : c_int = 2;
37443748
}
3749+
3750+
#[cfg(target_os = "macos")]
3751+
pub mod sysconf {
3752+
use types::os::arch::c95::c_int;
3753+
pub static _SC_NPROCESSORS_ONLN : c_int = 58;
3754+
}
3755+
37453756
#[cfg(target_os = "android")]
37463757
pub mod sysconf {
37473758
use types::os::arch::c95::c_int;

0 commit comments

Comments
 (0)