summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-06-21 14:03:25 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-06-21 21:52:57 -0700
commit45de3fedbac73bc8ff501117d64f19092e1b18b4 (patch)
tree828f4c55b1288ad0f7098c409bd512bf9a84174e /src/corelib/thread
parentcb0b1ee4417d67104c2c80e0c0c2d8a32e905df3 (diff)
QThread:idealThreadCount: fix build with FreeBSD 13.1
They added the CPU_COUNT_S macro. Pick-to: 6.4 Change-Id: I6d3880c7d99d4fc494c8fffd16fabe9f8226ecda Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 12c057110d..d7e5135199 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -413,7 +413,7 @@ int QThread::idealThreadCount() noexcept
cores = (int)psd.psd_proc_cnt;
}
#elif (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_FREEBSD)
-# ifdef Q_OS_FREEBSD
+# if defined(Q_OS_FREEBSD) && !defined(CPU_COUNT_S)
# define CPU_COUNT_S(setsize, cpusetp) ((int)BIT_COUNT(setsize, cpusetp))
// match the Linux API for simplicity
using cpu_set_t = cpuset_t;