tag 667329 patch
thanks

Matthias Klose <d...@debian.org> (03/04/2012):
> Package: powertop
> Version: 1.97-2
> Severity: important
> Tags: sid wheezy
> User: debian-...@lists.debian.org
> Usertags: ftbfs-gcc-4.7

Here's a patch to fix this FTBFS. No intent to NMU.

Mraw,
KiBi.
diff -Nru powertop-1.97/debian/changelog powertop-1.97/debian/changelog
--- powertop-1.97/debian/changelog	2011-03-17 15:25:01.000000000 +0000
+++ powertop-1.97/debian/changelog	2012-04-05 00:11:19.000000000 +0000
@@ -1,3 +1,11 @@
+powertop (1.97-2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTBFS with gcc 4.7 by fixing missing <unistd.h> includes
+    (Closes: #667329).
+
+ -- Cyril Brulebois <k...@debian.org>  Thu, 05 Apr 2012 00:10:58 +0000
+
 powertop (1.97-2) unstable; urgency=low
 
   * Fix a build failure on ia64
diff -Nru powertop-1.97/debian/patches/fix_ftbfs_with_gcc_4.7.patch powertop-1.97/debian/patches/fix_ftbfs_with_gcc_4.7.patch
--- powertop-1.97/debian/patches/fix_ftbfs_with_gcc_4.7.patch	1970-01-01 00:00:00.000000000 +0000
+++ powertop-1.97/debian/patches/fix_ftbfs_with_gcc_4.7.patch	2012-04-05 00:10:44.000000000 +0000
@@ -0,0 +1,108 @@
+--- a/main.cpp
++++ b/main.cpp
+@@ -27,6 +27,7 @@
+ #include <stdio.h>
+ #include <time.h>
+ #include <sys/stat.h>
++#include <unistd.h>
+ 
+ #include "cpu/cpu.h"
+ #include "process/process.h"
+--- a/cpu/intel_cpus.cpp
++++ b/cpu/intel_cpus.cpp
+@@ -34,6 +34,7 @@
+ #include <sys/time.h>
+ #include <string.h>
+ #include <errno.h>
++#include <unistd.h>
+ 
+ #include "../lib.h"
+ #include "../parameters/parameters.h"
+--- a/devices/alsa.cpp
++++ b/devices/alsa.cpp
+@@ -28,6 +28,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <dirent.h>
++#include <unistd.h>
+ 
+ 
+ using namespace std;
+@@ -214,4 +215,4 @@ const char * alsa::human_name(void)
+ 	if (strlen(guilty) > 0)
+ 		sprintf(temp_buf, "%s (%s)", humanname, guilty);
+ 	return temp_buf;
+-}
+\ No newline at end of file
++}
+--- a/devices/i915-gpu.cpp
++++ b/devices/i915-gpu.cpp
+@@ -28,6 +28,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <dirent.h>
++#include <unistd.h>
+ 
+ 
+ using namespace std;
+@@ -91,4 +92,4 @@ double i915gpu::power_usage(struct resul
+ 
+ 	power += util * factor / 100.0;
+ 	return power;
+-}
+\ No newline at end of file
++}
+--- a/devices/network.cpp
++++ b/devices/network.cpp
+@@ -33,6 +33,7 @@
+ #include <dirent.h>
+ #include <libgen.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ 
+ #include <linux/ethtool.h>
+ 
+@@ -410,4 +411,4 @@ double network::power_usage(struct resul
+ 	power += util * factor / 100;
+ 
+ 	return power;
+-}
+\ No newline at end of file
++}
+--- a/devices/rfkill.cpp
++++ b/devices/rfkill.cpp
+@@ -29,6 +29,7 @@
+ #include <sys/types.h>
+ #include <dirent.h>
+ #include <libgen.h>
++#include <unistd.h>
+ 
+ 
+ using namespace std;
+@@ -182,4 +183,4 @@ double rfkill::power_usage(struct result
+ 	power += util * factor / 100.0;
+ 
+ 	return power;
+-}
+\ No newline at end of file
++}
+--- a/devices/thinkpad-fan.cpp
++++ b/devices/thinkpad-fan.cpp
+@@ -29,6 +29,7 @@
+ #include <sys/types.h>
+ #include <dirent.h>
+ #include <math.h>
++#include <unistd.h>
+ 
+ #include "../lib.h"
+ 
+--- a/html.cpp
++++ b/html.cpp
+@@ -29,6 +29,7 @@
+ #include <utility>
+ #include <iostream>
+ #include <fstream>
++#include <unistd.h>
+ 
+ #include "css.h"
+ #include "lib.h"
diff -Nru powertop-1.97/debian/patches/series powertop-1.97/debian/patches/series
--- powertop-1.97/debian/patches/series	2011-03-17 15:25:01.000000000 +0000
+++ powertop-1.97/debian/patches/series	2012-04-05 00:07:37.000000000 +0000
@@ -1,3 +1,4 @@
 fix_prefix_in_manpage.patch
 fix_NR_perf_event_open_on_ia64.patch
 fix_csstoh_on_sparc
+fix_ftbfs_with_gcc_4.7.patch

Attachment: signature.asc
Description: Digital signature

Reply via email to