[powertop/f16: 3/3] Fixed 'unknown' readings from ACPI meters Resolves: rhbz#770289 Fixed compilation on f17
Jaroslav Škarvada
jskarvad at fedoraproject.org
Wed Jan 11 15:30:36 UTC 2012
commit 5650fd5d1c2910ba484838121019e03f99325e73
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date: Wed Jan 11 16:30:26 2012 +0100
Fixed 'unknown' readings from ACPI meters
Resolves: rhbz#770289
Fixed compilation on f17
powertop-1.98-compile-fix.patch | 110 +++++++++++++++++++++++++++++++++++++++
powertop.spec | 3 +
2 files changed, 113 insertions(+), 0 deletions(-)
---
diff --git a/powertop-1.98-compile-fix.patch b/powertop-1.98-compile-fix.patch
new file mode 100644
index 0000000..cb21c4c
--- /dev/null
+++ b/powertop-1.98-compile-fix.patch
@@ -0,0 +1,110 @@
+diff -up powertop-1.98/devices/alsa.cpp.orig powertop-1.98/devices/alsa.cpp
+--- powertop-1.98/devices/alsa.cpp.orig 2011-05-11 06:48:37.000000000 +0200
++++ powertop-1.98/devices/alsa.cpp 2012-01-11 16:19:53.365786704 +0100
+@@ -28,6 +28,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <dirent.h>
++#include <unistd.h>
+
+
+ using namespace std;
+diff -up powertop-1.98/devices/device.cpp.orig powertop-1.98/devices/device.cpp
+--- powertop-1.98/devices/device.cpp.orig 2011-05-11 06:48:37.000000000 +0200
++++ powertop-1.98/devices/device.cpp 2012-01-11 16:13:38.284981557 +0100
+@@ -29,6 +29,7 @@
+ #include <stdio.h>
+ #include <limits.h>
+ #include <stdlib.h>
++#include <unistd.h>
+
+ using namespace std;
+
+diff -up powertop-1.98/html.cpp.orig powertop-1.98/html.cpp
+--- powertop-1.98/html.cpp.orig 2011-05-11 06:48:37.000000000 +0200
++++ powertop-1.98/html.cpp 2012-01-11 16:06:58.714989836 +0100
+@@ -29,6 +29,7 @@
+ #include <utility>
+ #include <iostream>
+ #include <fstream>
++#include <unistd.h>
+
+ #include "css.h"
+ #include "lib.h"
+diff -up powertop-1.98/devices/i915-gpu.cpp.orig powertop-1.98/devices/i915-gpu.cpp
+--- powertop-1.98/devices/i915-gpu.cpp.orig 2011-05-11 06:48:37.000000000 +0200
++++ powertop-1.98/devices/i915-gpu.cpp 2012-01-11 16:21:46.958008197 +0100
+@@ -28,6 +28,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <dirent.h>
++#include <unistd.h>
+
+
+ using namespace std;
+diff -up powertop-1.98/cpu/intel_cpus.cpp.orig powertop-1.98/cpu/intel_cpus.cpp
+--- powertop-1.98/cpu/intel_cpus.cpp.orig 2011-05-11 06:48:37.000000000 +0200
++++ powertop-1.98/cpu/intel_cpus.cpp 2012-01-11 16:11:55.784740852 +0100
+@@ -34,6 +34,7 @@
+ #include <sys/time.h>
+ #include <string.h>
+ #include <errno.h>
++#include <unistd.h>
+
+ #include "../lib.h"
+ #include "../parameters/parameters.h"
+diff -up powertop-1.98/main.cpp.orig powertop-1.98/main.cpp
+--- powertop-1.98/main.cpp.orig 2011-05-11 06:48:37.000000000 +0200
++++ powertop-1.98/main.cpp 2012-01-11 16:00:06.445806979 +0100
+@@ -33,6 +33,7 @@
+ #include <time.h>
+ #include <sys/stat.h>
+ #include <getopt.h>
++#include <unistd.h>
+
+ #include "cpu/cpu.h"
+ #include "process/process.h"
+diff -up powertop-1.98/devices/network.cpp.orig powertop-1.98/devices/network.cpp
+--- powertop-1.98/devices/network.cpp.orig 2011-05-11 06:48:37.000000000 +0200
++++ powertop-1.98/devices/network.cpp 2012-01-11 16:23:18.176178890 +0100
+@@ -33,6 +33,7 @@
+ #include <dirent.h>
+ #include <libgen.h>
+ #include <stdlib.h>
++#include <unistd.h>
+
+ #include <linux/ethtool.h>
+
+diff -up powertop-1.98/devices/rfkill.cpp.orig powertop-1.98/devices/rfkill.cpp
+--- powertop-1.98/devices/rfkill.cpp.orig 2011-05-11 06:48:37.000000000 +0200
++++ powertop-1.98/devices/rfkill.cpp 2012-01-11 16:15:46.003268813 +0100
+@@ -29,6 +29,7 @@
+ #include <sys/types.h>
+ #include <dirent.h>
+ #include <libgen.h>
++#include <unistd.h>
+
+
+ using namespace std;
+diff -up powertop-1.98/devices/thinkpad-fan.cpp.orig powertop-1.98/devices/thinkpad-fan.cpp
+--- powertop-1.98/devices/thinkpad-fan.cpp.orig 2011-05-11 06:48:37.000000000 +0200
++++ powertop-1.98/devices/thinkpad-fan.cpp 2012-01-11 16:25:27.550410318 +0100
+@@ -29,6 +29,7 @@
+ #include <sys/types.h>
+ #include <dirent.h>
+ #include <math.h>
++#include <unistd.h>
+
+ #include "../lib.h"
+
+diff -up powertop-1.98/devices/thinkpad-light.cpp.orig powertop-1.98/devices/thinkpad-light.cpp
+--- powertop-1.98/devices/thinkpad-light.cpp.orig 2012-01-11 16:27:38.000000000 +0100
++++ powertop-1.98/devices/thinkpad-light.cpp 2012-01-11 16:27:50.995652724 +0100
+@@ -29,6 +29,7 @@
+ #include <sys/types.h>
+ #include <dirent.h>
+ #include <math.h>
++#include <unistd.h>
+
+ #include "../lib.h"
+
diff --git a/powertop.spec b/powertop.spec
index e65715f..80a4211 100644
--- a/powertop.spec
+++ b/powertop.spec
@@ -10,6 +10,7 @@ URL: http://www.lesswatts.org/
Source0: http://www.kernel.org/pub/linux/status/powertop/%{name}-%{version}.tar.bz2
Patch0: powertop-1.98-always-create-params.patch
Patch1: powertop-1.98-unknown-readings-fix.patch
+Patch2: powertop-1.98-compile-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext, ncurses-devel, pciutils-devel, zlib-devel, libnl-devel
@@ -21,6 +22,7 @@ computer use more power than necessary while it is idle.
%setup -q
%patch0 -p1 -b .always-create-params
%patch1 -p1 -b .unknown-readings-fix
+%patch2 -p1 -b .compile-fix
%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
@@ -56,6 +58,7 @@ rm -rf %{buildroot}
* Tue Jan 10 2012 Jaroslav Škarvada <jskarvad at redhat.com> - 1.98-3
- Fixed 'unknown' readings from ACPI meters
Resolves: rhbz#770289
+- Fixed compilation on f17
* Fri Dec 2 2011 Jaroslav Škarvada <jskarvad at redhat.com> - 1.98-2
- Always create params file
More information about the scm-commits
mailing list