[cppcheck] Fix FTBFS using gcc 4.7.
Jussi Lehtola
jussilehtola at fedoraproject.org
Thu Jan 5 10:49:50 UTC 2012
commit 0241ca4525c190c2583203dfae2c4391fede8fde
Author: Jussi Lehtola <jussilehtola at fedoraproject.org>
Date: Thu Jan 5 12:49:45 2012 +0200
Fix FTBFS using gcc 4.7.
cppcheck-1.52-include.patch | 11 +++++++++++
cppcheck.spec | 8 +++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/cppcheck-1.52-include.patch b/cppcheck-1.52-include.patch
new file mode 100644
index 0000000..6857e5c
--- /dev/null
+++ b/cppcheck-1.52-include.patch
@@ -0,0 +1,11 @@
+diff -up cppcheck-1.52/test/testfilelister.cpp.orig cppcheck-1.52/test/testfilelister.cpp
+--- cppcheck-1.52/test/testfilelister.cpp.orig 2011-12-10 14:00:45.000000000 +0200
++++ cppcheck-1.52/test/testfilelister.cpp 2012-01-05 12:45:09.197377791 +0200
+@@ -24,6 +24,7 @@
+ #ifndef _WIN32
+ #include <limits.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #endif
+
+ class TestFileLister: public TestFixture {
diff --git a/cppcheck.spec b/cppcheck.spec
index 472d6f2..0c36ce5 100644
--- a/cppcheck.spec
+++ b/cppcheck.spec
@@ -1,11 +1,13 @@
Name: cppcheck
Version: 1.52
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Tool for static C/C++ code analysis
Group: Development/Languages
License: GPLv3+
URL: http://cppcheck.wiki.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
+# Add missing includes
+Patch0: cppcheck-1.52-include.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: pcre-devel
@@ -23,6 +25,7 @@ errors in the code (i.e. have zero false positives).
%prep
%setup -q
+%patch0 -p1 -b .include
# Make sure bundled tinyxml is not used
rm -r externals/tinyxml
@@ -55,6 +58,9 @@ rm -rf %{buildroot}
%{_mandir}/man1/cppcheck.1*
%changelog
+* Thu Jan 05 2012 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1.52-2
+- Add missing includes (fix FTBFS in rawhide).
+
* Sun Dec 11 2011 Jussi Lehtola <jussilehtola at fedoraproject.org> - 1.52-1
- Update to 1.52.
More information about the scm-commits
mailing list