diff options
-rw-r--r-- | desktop/razorqt/patches/libstatgrab-0.90.patch | 57 | ||||
-rw-r--r-- | desktop/razorqt/razorqt.SlackBuild | 3 |
2 files changed, 60 insertions, 0 deletions
diff --git a/desktop/razorqt/patches/libstatgrab-0.90.patch b/desktop/razorqt/patches/libstatgrab-0.90.patch new file mode 100644 index 0000000000..d168e5644d --- /dev/null +++ b/desktop/razorqt/patches/libstatgrab-0.90.patch @@ -0,0 +1,57 @@ +--- a/razorqt-panel/plugin-networkmonitor/razornetworkmonitor.cpp ++++ b/razorqt-panel/plugin-networkmonitor/razornetworkmonitor.cpp +@@ -45,7 +45,7 @@ + addWidget(&m_stuff); + + /* Initialise statgrab */ +- sg_init(); ++ sg_init(1); + + m_iconList << "modem" << "monitor" + << "network" << "wireless"; +@@ -72,11 +72,11 @@ + { + bool matched = false; + +- int num_network_stats; ++ size_t num_network_stats; + + sg_network_io_stats *network_stats = sg_get_network_io_stats_diff(&num_network_stats); + +- for (int x = 0; x < num_network_stats; x++) ++ for (size_t x = 0; x < num_network_stats; x++) + { + if (m_interface == QString::fromLocal8Bit(network_stats->interface_name)) + { +@@ -129,9 +129,9 @@ + { + if (event->type() == QEvent::ToolTip) + { +- int num_network_stats; ++ size_t num_network_stats; + sg_network_io_stats *network_stats = sg_get_network_io_stats(&num_network_stats); +- for (int x = 0; x < num_network_stats; x++) ++ for (size_t x = 0; x < num_network_stats; x++) + { + if (m_interface == QString::fromLocal8Bit(network_stats->interface_name)) + { +--- a/razorqt-panel/plugin-cpuload/razorcpuload.cpp ++++ b/razorqt-panel/plugin-cpuload/razorcpuload.cpp +@@ -52,7 +52,7 @@ + addWidget(&m_stuff); + + /* Initialise statgrab */ +- sg_init(); ++ sg_init(1); + + /* Drop setuid/setgid privileges. */ + if (sg_drop_privileges() != 0) { +@@ -89,7 +89,7 @@ + + double RazorCpuLoad::getLoadCpu() const + { +- sg_cpu_percents* cur = sg_get_cpu_percents(); ++ sg_cpu_percents* cur = sg_get_cpu_percents(NULL); + return (cur->user + cur->kernel + cur->nice); + } + diff --git a/desktop/razorqt/razorqt.SlackBuild b/desktop/razorqt/razorqt.SlackBuild index a461c280c6..30374869f2 100644 --- a/desktop/razorqt/razorqt.SlackBuild +++ b/desktop/razorqt/razorqt.SlackBuild @@ -78,6 +78,9 @@ find -L . \ # Fix hardcoded xdg path patch -p1 < $CWD/patches/dont_hardcode_xdg_path.patch +# Patch for updated libstatgrab (thanks to Debian) +patch -p1 < $CWD/patches/libstatgrab-0.90.patch + # Where our system config (razor and xdg files) resides RCONFDIR=${RCONFDIR:-etc/razor/xdg} |