about summary refs log tree commit diff
path: root/src/liblibc
diff options
context:
space:
mode:
authorpez <james.austin.perry@gmail.com>2015-04-13 14:24:47 +0100
committerpez <james.austin.perry@gmail.com>2015-04-13 14:24:47 +0100
commit6f54ce9aa5d2baf0cd82c01e2c181ab17439b7d7 (patch)
tree6da4dbf478de63a5a1e5e52a13c4374c49801363 /src/liblibc
parent3cac76bcf239c5db7d612eea52dd39be6e0281b4 (diff)
downloadrust-6f54ce9aa5d2baf0cd82c01e2c181ab17439b7d7.tar.gz
rust-6f54ce9aa5d2baf0cd82c01e2c181ab17439b7d7.zip
added _SC_NPROCESSORS_ONLN constants for linux and macos for fix #24374
Diffstat (limited to 'src/liblibc')
-rw-r--r--src/liblibc/lib.rs15
1 files changed, 15 insertions, 0 deletions
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;