netbsd: fix thread affinity compilation error (#4787)
Fixes: https://github.com/libuv/libuv/issues/4785
This commit is contained in:
parent
36d6a17c9a
commit
9ba8078272
@ -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__)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user