Commit 466b6403 authored by Brad Smith's avatar Brad Smith Committed by Alexandre Julliard

ntll: Fix the detection of the number of CPUs for OpenBSD.

parent ab521860
......@@ -1191,15 +1191,16 @@ void fill_cpu_info(void)
}
#elif defined (__OpenBSD__)
{
int mib[2], num;
int mib[2], num, ret;
size_t len;
mib[0] = CTL_HW;
mib[1] = HW_NCPU;
len = sizeof(num);
num = sysctl(mib, 2, &num, &len, NULL, 0);
NtCurrentTeb()->Peb->NumberOfProcessors = num;
ret = sysctl(mib, 2, &num, &len, NULL, 0);
if (!ret)
NtCurrentTeb()->Peb->NumberOfProcessors = num;
}
#elif defined (__APPLE__)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment