about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
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 {