Skip to content

Commit 32e5906

Browse files
committed
Use HW_NCPUONLINE on OpenBSD
HW_NCPUONLINE is the proper sysctl to use for the logical processor count.
1 parent 6746bc4 commit 32e5906

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codec/common/src/WelsThreadLib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ WELS_THREAD_ERROR_CODE WelsQueryLogicalProcessInfo (WelsLogicalProcessInfo* p
522522
size_t len = sizeof (pInfo->ProcessorCount);
523523

524524
#if defined(__OpenBSD__)
525-
int scname[] = { CTL_HW, HW_NCPU };
525+
int scname[] = { CTL_HW, HW_NCPUONLINE };
526526
if (sysctl (scname, 2, &pInfo->ProcessorCount, &len, NULL, 0) == -1)
527527
#else
528528
if (sysctlbyname (HW_NCPU_NAME, &pInfo->ProcessorCount, &len, NULL, 0) == -1)

0 commit comments

Comments
 (0)