Skip to content

Commit d589021

Browse files
authored
Rollup merge of rust-lang#123038 - he32:netbsd-ilp32-fix, r=workingjubilee
std library thread.rs: fix NetBSD code for ILP32 CPUs.
2 parents 4bdf171 + 1ad3954 commit d589021

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/pal/unix/thread.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
424424
if !set.is_null() {
425425
let mut count: usize = 0;
426426
if libc::pthread_getaffinity_np(libc::pthread_self(), libc::_cpuset_size(set), set) == 0 {
427-
for i in 0..u64::MAX {
427+
for i in 0..libc::cpuid_t::MAX {
428428
match libc::_cpuset_isset(i, set) {
429429
-1 => break,
430430
0 => continue,

0 commit comments

Comments
 (0)