Brad Smith : ntll: Fix the detection of the number of CPUs for OpenBSD.
Module: wine Branch: master Commit: 466b64032f733777b517828f3fc141a77feb3cdc URL: http://source.winehq.org/git/wine.git/?a=commit;h=466b64032f733777b517828f3f... Author: Brad Smith <brad(a)comstyle.com> Date: Fri Sep 17 20:38:51 2010 -0400 ntll: Fix the detection of the number of CPUs for OpenBSD. --- dlls/ntdll/nt.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index ee50921..0f37def 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -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__) {
participants (1)
-
Alexandre Julliard