[apt] - fix build with gcc 4.7

Panu Matilainen pmatilai at fedoraproject.org
Mon Mar 26 09:58:07 UTC 2012


commit 2aaec56570cb19f2ecac3e4e2ed6cb99a7119853
Author: Panu Matilainen <pmatilai at redhat.com>
Date:   Mon Mar 26 12:57:55 2012 +0300

    - fix build with gcc 4.7

 apt-0.5.15lorg3.95-gcc47.patch |   33 +++++++++++++++++++++++++++++++++
 apt.spec                       |    6 ++++++
 2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/apt-0.5.15lorg3.95-gcc47.patch b/apt-0.5.15lorg3.95-gcc47.patch
new file mode 100644
index 0000000..9181763
--- /dev/null
+++ b/apt-0.5.15lorg3.95-gcc47.patch
@@ -0,0 +1,33 @@
+diff -up apt-0.5.15lorg3.95.git522/apt-pkg/contrib/progress.h.gcc47 apt-0.5.15lorg3.95.git522/apt-pkg/contrib/progress.h
+--- apt-0.5.15lorg3.95.git522/apt-pkg/contrib/progress.h.gcc47	2012-03-26 12:49:24.841272233 +0300
++++ apt-0.5.15lorg3.95.git522/apt-pkg/contrib/progress.h	2012-03-26 12:49:34.113245024 +0300
+@@ -24,6 +24,7 @@
+ #include <map>
+ #include <string>
+ #include <sys/time.h>
++#include <sys/types.h>
+ 
+ using std::string;
+ using std::map;
+diff -up apt-0.5.15lorg3.95.git522/apt-pkg/pkgcache.h.gcc47 apt-0.5.15lorg3.95.git522/apt-pkg/pkgcache.h
+--- apt-0.5.15lorg3.95.git522/apt-pkg/pkgcache.h.gcc47	2012-03-26 12:48:54.276361471 +0300
++++ apt-0.5.15lorg3.95.git522/apt-pkg/pkgcache.h	2012-03-26 12:49:02.107338589 +0300
+@@ -21,6 +21,7 @@
+ 
+ #include <string>
+ #include <time.h>
++#include <sys/types.h>
+ #include <apt-pkg/mmap.h>
+ 
+ using std::string;
+diff -up apt-0.5.15lorg3.95.git522/apt-pkg/srcrecords.h.gcc47 apt-0.5.15lorg3.95.git522/apt-pkg/srcrecords.h
+--- apt-0.5.15lorg3.95.git522/apt-pkg/srcrecords.h.gcc47	2012-03-26 12:50:02.745161198 +0300
++++ apt-0.5.15lorg3.95.git522/apt-pkg/srcrecords.h	2012-03-26 12:50:19.495112171 +0300
+@@ -15,6 +15,7 @@
+ 
+ #include <string>
+ #include <vector>    
++#include <sys/types.h>
+ 
+ using std::string;
+ using std::vector;
diff --git a/apt.spec b/apt.spec
index 8ee17c5..cfb3327 100644
--- a/apt.spec
+++ b/apt.spec
@@ -43,6 +43,8 @@ Source200: apt.service
 Patch0: apt-0.5.15lorg3.2-ppc.patch
 # band aid for mmap issues (#211254)
 Patch1: apt-0.5.15lorg3.x-cache-corruption.patch
+# fix build with gcc 4.7
+Patch2: apt-0.5.15lorg3.95-gcc47.patch
 
 # TODO: verify the required minimum Python version
 BuildRequires: python-devel >= 2.2
@@ -160,6 +162,7 @@ about it in /var/log/apt.log, or in the configured file.
 %setup -q -n %{name}-%{srcver}
 %patch0 -p1 -b .ppc
 %patch1 -p0 -b .mmap
+%patch2 -p1 -b .gcc47
 
 install -pm 644 %{SOURCE19} comps2prio.xsl
 
@@ -355,6 +358,9 @@ fi
 
 
 %changelog
+* Mon Mar 26 2012 Panu Matilainen <pmatilai at redhat.com> - 0.5.15lorg3.95-6.git52 2.1
+- fix build with gcc 4.7
+
 * Tue Mar 20 2012 Panu Matilainen <pmatilai at redhat.com> - 0.5.15lorg3.95-5.git522.1
 - rebuild for new rpm 
 


More information about the scm-commits mailing list