From 952f7c921e570e1e2d90cabfd232f6a76ce9f630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 19 Feb 2019 16:55:03 +0100 Subject: [PATCH] Fix FTBFS on FreeBSD Taken from FreeBSD patches. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/kcpuproc.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kcpuproc.cpp b/src/kcpuproc.cpp index f7fbe4f..bbc21ce 100644 --- a/src/kcpuproc.cpp +++ b/src/kcpuproc.cpp @@ -18,8 +18,12 @@ // BSD-specific includes. #ifdef Q_OS_BSD4 -#include #include +#if defined(__FreeBSD__) && __FreeBSD_version >= 500101 +#include +#else +#include +#endif #include #include #include @@ -134,7 +138,7 @@ void KCPUProc::readLoad() { static int oidCpuTime[CTL_MAXNAME + 2]; static size_t oidCpuTimeLen = sizeof(oidCpuTime); long cpuTime[CPUSTATES]; - unsigned int cpuTimeLen = sizeof(cpuTime); + size_t cpuTimeLen = sizeof(cpuTime); static char *name = "kern.cp_time"; static int initialized = 0;