Fix FTBFS on FreeBSD

Taken from FreeBSD patches.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 952f7c921e)
r14.0.x
Slávek Banko 6 years ago
parent 8a9ec5847d
commit 36dada973a
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -18,8 +18,12 @@
// BSD-specific includes. // BSD-specific includes.
#ifdef Q_OS_BSD4 #ifdef Q_OS_BSD4
#include <sys/dkstat.h>
#include <sys/param.h> #include <sys/param.h>
#if defined(__FreeBSD__) && __FreeBSD_version >= 500101
#include <sys/resource.h>
#else
#include <sys/dkstat.h>
#endif
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <string.h> #include <string.h>
#include <kvm.h> #include <kvm.h>
@ -134,7 +138,7 @@ void KCPUProc::readLoad() {
static int oidCpuTime[CTL_MAXNAME + 2]; static int oidCpuTime[CTL_MAXNAME + 2];
static size_t oidCpuTimeLen = sizeof(oidCpuTime); static size_t oidCpuTimeLen = sizeof(oidCpuTime);
long cpuTime[CPUSTATES]; long cpuTime[CPUSTATES];
unsigned int cpuTimeLen = sizeof(cpuTime); size_t cpuTimeLen = sizeof(cpuTime);
static char *name = "kern.cp_time"; static char *name = "kern.cp_time";
static int initialized = 0; static int initialized = 0;

Loading…
Cancel
Save