netbsd: fix thread affinity compilation error (#4787)

Fixes: https://github.com/libuv/libuv/issues/4785
This commit is contained in:
Santiago Gimeno 2025-08-25 16:22:15 +02:00 committed by GitHub
parent 36d6a17c9a
commit 9ba8078272
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2048,8 +2048,8 @@ unsigned int uv_available_parallelism(void) {
#elif defined(__NetBSD__)
cpuset_t* set = cpuset_create();
if (set != NULL) {
if (0 == sched_getaffinity_np(getpid(), sizeof(set), &set))
rc = uv__cpu_count(&set);
if (0 == sched_getaffinity_np(getpid(), cpuset_size(set), set))
rc = uv__cpu_count(set);
cpuset_destroy(set);
}
#elif defined(__APPLE__)