From c4206da3f7eeb7921215b03677e77a2e699db08c Mon Sep 17 00:00:00 2001 From: KWSys Upstream Date: Mon, 10 Feb 2025 07:53:50 -0500 Subject: [PATCH] KWSys 2025-02-10 (2e2f80f1) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 2e2f80f1d074b1f888ff41f5bc5a2229f3eab6a0 (master). Upstream Shortlog ----------------- Brad Smith (1): a13d90c2 SystemInformation: use HW_NCPUONLINE on OpenBSD and NetBSD --- SystemInformation.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SystemInformation.cxx b/SystemInformation.cxx index 9ac30bc7c7..c679c48ddb 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -5131,7 +5131,11 @@ bool SystemInformationImplementation::QueryBSDProcessor() defined(__DragonFly__) int k; size_t sz = sizeof(k); +# ifdef HW_NCPUONLINE + int ctrl[2] = { CTL_HW, HW_NCPUONLINE }; +# else int ctrl[2] = { CTL_HW, HW_NCPU }; +# endif if (sysctl(ctrl, 2, &k, &sz, nullptr, 0) != 0) { return false;