about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-27 05:21:16 +0100
committerGitHub <noreply@github.com>2024-03-27 05:21:16 +0100
commitd589021b4b538b3dbb3f2a5203408352679f2e12 (patch)
treeb148847ebadc223d187b83313f8b9b70bc09ad86
parent4bdf1711c6e29b88404f035b642f1e0ab93aec41 (diff)
parent1ad3954668ccad3d00b9d98d9d24fb76fae1c0f9 (diff)
downloadrust-d589021b4b538b3dbb3f2a5203408352679f2e12.tar.gz
rust-d589021b4b538b3dbb3f2a5203408352679f2e12.zip
Rollup merge of #123038 - he32:netbsd-ilp32-fix, r=workingjubilee
std library thread.rs: fix NetBSD code for ILP32 CPUs.
-rw-r--r--library/std/src/sys/pal/unix/thread.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs
index a3e1b6782e8..4cd7c0e3059 100644
--- a/library/std/src/sys/pal/unix/thread.rs
+++ b/library/std/src/sys/pal/unix/thread.rs
@@ -424,7 +424,7 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
                     if !set.is_null() {
                         let mut count: usize = 0;
                         if libc::pthread_getaffinity_np(libc::pthread_self(), libc::_cpuset_size(set), set) == 0 {
-                            for i in 0..u64::MAX {
+                            for i in 0..libc::cpuid_t::MAX {
                                 match libc::_cpuset_isset(i, set) {
                                     -1 => break,
                                     0 => continue,