summaryrefslogtreecommitdiff
path: root/sysutils/libsysstat/files/patch-cpustat__p.h
diff options
context:
space:
mode:
authorJesper Schmitz Mouridsen <jsm@FreeBSD.org>2018-07-30 15:00:40 +0000
committerJesper Schmitz Mouridsen <jsm@FreeBSD.org>2018-07-30 15:00:40 +0000
commit9c1a3531d4e5af327eb6a4c41395feecd7024bc2 (patch)
treebfd51854a6f2482e00a6c2bfa1c3539f562027a2 /sysutils/libsysstat/files/patch-cpustat__p.h
parentdevel/dragon: update 1.5.0 -> 1.5.1 (diff)
New port sysutils/libsysstat
PR: 229296 Approved by: miwi (mentor) Differential Revision: https://reviews.freebsd.org/D16498
Notes
Notes: svn path=/head/; revision=475896
Diffstat (limited to 'sysutils/libsysstat/files/patch-cpustat__p.h')
-rw-r--r--sysutils/libsysstat/files/patch-cpustat__p.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/sysutils/libsysstat/files/patch-cpustat__p.h b/sysutils/libsysstat/files/patch-cpustat__p.h
new file mode 100644
index 000000000000..3b7d44490d46
--- /dev/null
+++ b/sysutils/libsysstat/files/patch-cpustat__p.h
@@ -0,0 +1,62 @@
+--- cpustat_p.h.orig 2018-07-28 14:34:10 UTC
++++ cpustat_p.h
+@@ -27,6 +27,9 @@
+ #ifndef LIBSYSSTAT__CPU_STAT__PRIVATE__INCLUDED
+ #define LIBSYSSTAT__CPU_STAT__PRIVATE__INCLUDED
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
+
+ #include <QtCore/QObject>
+ #include <QtCore/QtGlobal>
+@@ -52,8 +55,13 @@ public:
+ CpuStat::Monitoring monitoring() const;
+ void setMonitoring(CpuStat::Monitoring value);
+
++#ifdef HAVE_SYSCTL_H
++ ulong minFreq(const QString &source) const;
++ ulong maxFreq(const QString &source) const;
++#else
+ uint minFreq(const QString &source) const;
+ uint maxFreq(const QString &source) const;
++#endif
+
+ signals:
+ void update(float user, float nice, float system, float other);
+@@ -74,12 +82,21 @@ private:
+ {
+ Values();
+
++#ifdef HAVE_SYSCTL_H
++ ulong user;
++ ulong nice;
++ ulong system;
++ ulong idle;
++ ulong other;
++ ulong total;
++#else
+ qulonglong user;
+ qulonglong nice;
+ qulonglong system;
+ qulonglong idle;
+ qulonglong other;
+ qulonglong total;
++#endif
+
+ void sum();
+
+@@ -89,7 +106,13 @@ private:
+
+ CpuStat::Monitoring mMonitoring;
+
++#ifdef HAVE_SYSCTL_H
++ typedef QMap<QString, QPair<ulong, ulong> > Bounds;
++ int mib0[2];
++ int mib1[2];
++#else
+ typedef QMap<QString, QPair<uint, uint> > Bounds;
++#endif
+ Bounds mBounds;
+
+ int mUserHz;