Changeset View
Changeset View
Standalone View
Standalone View
sysutils/libsysstat/files/patch-cpustat__p.h
--- cpustat_p.h.orig 2018-07-28 14:34:10 UTC | --- cpustat_p.h.orig 2019-01-30 19:24:29 UTC | ||||
+++ cpustat_p.h | +++ cpustat_p.h | ||||
@@ -27,6 +27,9 @@ | @@ -27,6 +27,9 @@ | ||||
#ifndef LIBSYSSTAT__CPU_STAT__PRIVATE__INCLUDED | #ifndef LIBSYSSTAT__CPU_STAT__PRIVATE__INCLUDED | ||||
#define LIBSYSSTAT__CPU_STAT__PRIVATE__INCLUDED | #define LIBSYSSTAT__CPU_STAT__PRIVATE__INCLUDED | ||||
+#ifdef HAVE_CONFIG_H | +#ifdef HAVE_CONFIG_H | ||||
+#include "config.h" | +#include "config.h" | ||||
+#endif | +#endif | ||||
#include <QtCore/QObject> | #include <QtCore/QObject> | ||||
#include <QtCore/QtGlobal> | #include <QtCore/QtGlobal> | ||||
@@ -52,8 +55,13 @@ public: | @@ -52,8 +55,13 @@ class CpuStatPrivate : public BaseStatPrivate (public) | ||||
CpuStat::Monitoring monitoring() const; | CpuStat::Monitoring monitoring() const; | ||||
void setMonitoring(CpuStat::Monitoring value); | void setMonitoring(CpuStat::Monitoring value); | ||||
+#ifdef HAVE_SYSCTL_H | +#ifdef HAVE_SYSCTL_H | ||||
+ ulong minFreq(const QString &source) const; | + ulong minFreq(const QString &source) const; | ||||
+ ulong maxFreq(const QString &source) const; | + ulong maxFreq(const QString &source) const; | ||||
+#else | +#else | ||||
uint minFreq(const QString &source) const; | uint minFreq(const QString &source) const; | ||||
uint maxFreq(const QString &source) const; | uint maxFreq(const QString &source) const; | ||||
+#endif | +#endif | ||||
signals: | signals: | ||||
void update(float user, float nice, float system, float other); | void update(float user, float nice, float system, float other); | ||||
@@ -74,12 +82,21 @@ private: | @@ -74,12 +82,21 @@ private slots: (private) | ||||
{ | { | ||||
Values(); | Values(); | ||||
+#ifdef HAVE_SYSCTL_H | +#ifdef HAVE_SYSCTL_H | ||||
+ ulong user; | + ulong user; | ||||
+ ulong nice; | + ulong nice; | ||||
+ ulong system; | + ulong system; | ||||
+ ulong idle; | + ulong idle; | ||||
+ ulong other; | + ulong other; | ||||
+ ulong total; | + ulong total; | ||||
+#else | +#else | ||||
qulonglong user; | qulonglong user; | ||||
qulonglong nice; | qulonglong nice; | ||||
qulonglong system; | qulonglong system; | ||||
qulonglong idle; | qulonglong idle; | ||||
qulonglong other; | qulonglong other; | ||||
qulonglong total; | qulonglong total; | ||||
+#endif | +#endif | ||||
void sum(); | void sum(); | ||||
@@ -89,7 +106,13 @@ private: | @@ -89,7 +106,13 @@ private slots: (private) | ||||
CpuStat::Monitoring mMonitoring; | CpuStat::Monitoring mMonitoring; | ||||
+#ifdef HAVE_SYSCTL_H | +#ifdef HAVE_SYSCTL_H | ||||
+ typedef QMap<QString, QPair<ulong, ulong> > Bounds; | + typedef QMap<QString, QPair<ulong, ulong> > Bounds; | ||||
+ int mib0[2]; | + int mib0[2]; | ||||
+ int mib1[2]; | + int mib1[2]; | ||||
+#else | +#else | ||||
typedef QMap<QString, QPair<uint, uint> > Bounds; | typedef QMap<QString, QPair<uint, uint> > Bounds; | ||||
+#endif | +#endif | ||||
Bounds mBounds; | Bounds mBounds; | ||||
int mUserHz; | int mUserHz; |