about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-12-23 15:19:54 +0000
committerbors <bors@rust-lang.org>2015-12-23 15:19:54 +0000
commit8037e62d29f7e0f7084c95b87c243dc83bdd8e3c (patch)
tree3e9874ed632b40403011b380a080fb708b60212f /src
parent4ce1dafd1d58852a88f38a0f63cb11236a7470cb (diff)
parent3beb4b1a6c1e8169ee970c9853b9b7936bf36fe5 (diff)
downloadrust-8037e62d29f7e0f7084c95b87c243dc83bdd8e3c.tar.gz
rust-8037e62d29f7e0f7084c95b87c243dc83bdd8e3c.zip
Auto merge of #30525 - semarie:ncpu, r=alexcrichton
Should unbreak build (well, remove one reason to break) for *bsd target.

r? @alexcrichton
Diffstat (limited to 'src')
-rw-r--r--src/libtest/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index a844bdf1351..2945d20ceb1 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -923,21 +923,21 @@ fn get_concurrency() -> usize {
               target_os = "netbsd"))]
     fn num_cpus() -> usize {
         let mut cpus: libc::c_uint = 0;
-        let mut CPUS_SIZE = std::mem::size_of_val(&cpus);
+        let mut cpus_size = std::mem::size_of_val(&cpus);
         let mut mib = [libc::CTL_HW, libc::HW_AVAILCPU, 0, 0];
 
         unsafe {
             libc::sysctl(mib.as_mut_ptr(), 2,
                          &mut cpus as *mut _ as *mut _,
-                         &mut CPUS_SIZE as *mut _ as *mut _,
+                         &mut cpus_size as *mut _ as *mut _,
                          0 as *mut _, 0);
         }
         if cpus < 1 {
-            mib[1] = HW_NCPU;
+            mib[1] = libc::HW_NCPU;
             unsafe {
                 libc::sysctl(mib.as_mut_ptr(), 2,
                              &mut cpus as *mut _ as *mut _,
-                             &mut CPUS_SIZE as *mut _ as *mut _,
+                             &mut cpus_size as *mut _ as *mut _,
                              0 as *mut _, 0);
             }
             if cpus < 1 {