From 6f54ce9aa5d2baf0cd82c01e2c181ab17439b7d7 Mon Sep 17 00:00:00 2001 From: pez Date: Mon, 13 Apr 2015 14:24:47 +0100 Subject: added _SC_NPROCESSORS_ONLN constants for linux and macos for fix #24374 --- src/liblibc/lib.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/liblibc') diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 040c9b011f3..310b7439613 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -3344,6 +3344,8 @@ pub mod consts { pub const _SC_XOPEN_REALTIME : c_int = 130; pub const _SC_XOPEN_REALTIME_THREADS : c_int = 131; + + pub const PTHREAD_CREATE_JOINABLE: c_int = 0; pub const PTHREAD_CREATE_DETACHED: c_int = 1; @@ -3742,6 +3744,19 @@ pub mod consts { pub static _SC_NPROCESSORS_ONLN : c_int = 1; pub static _SC_PAGESIZE : c_int = 2; } + + #[cfg(target_os = "linux")] + pub mod sysconf { + use types::os::arch::c95::c_int; + pub static _SC_NPROCESSORS_ONLN : c_int = 84; + } + + #[cfg(target_os = "macos")] + pub mod sysconf { + use types::os::arch::c95::c_int; + pub static _SC_NPROCESSORS_ONLN : c_int = 58; + } + #[cfg(target_os = "android")] pub mod sysconf { use types::os::arch::c95::c_int; -- cgit 1.4.1-3-g733a5