Fix gcc47 compile failure

This commit is contained in:
Vitezslav Crhonek 2012-01-05 14:01:23 +01:00
parent 97f7af2e86
commit c8f42866a8
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,26 @@
diff -up sblim-wbemcli-1.6.2/CimCurl.h.orig sblim-wbemcli-1.6.2/CimCurl.h
--- sblim-wbemcli-1.6.2/CimCurl.h.orig 2012-01-05 13:55:30.901154659 +0100
+++ sblim-wbemcli-1.6.2/CimCurl.h 2012-01-05 13:55:44.723271863 +0100
@@ -24,6 +24,7 @@
#include "CimXml.h"
#include <curl/curl.h>
#include <sstream>
+#include <unistd.h>
class CimomCurl : public Cimom {
diff -up sblim-wbemcli-1.6.2/CimXml.h.orig sblim-wbemcli-1.6.2/CimXml.h
--- sblim-wbemcli-1.6.2/CimXml.h.orig 2012-01-05 13:54:52.445828446 +0100
+++ sblim-wbemcli-1.6.2/CimXml.h 2012-01-05 13:54:52.449828480 +0100
@@ -129,9 +129,9 @@ template<class T> class ArrayXml : publi
public:
ArrayXml() {}
ArrayXml<T> * clone() const { return new ArrayXml<T>(*this);}
- void add(const T& t) { push_back(t); }
+ void add(const T& t) { this->push_back(t); }
#if !defined(GCC_VERSION) || GCC_VERSION >= 3000
- T& operator[] (size_type n) {return at(n);}
+ T& operator[] (size_type n) {return this->at(n);}
const T& operator[] (size_type n) const {return at(n);}
#endif
T *get(int n) { return &(*this)[n]; }

View File

@ -1,6 +1,6 @@
Name: sblim-wbemcli
Version: 1.6.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: SBLIM WBEM Command Line Interface
Group: Applications/System
@ -8,6 +8,7 @@ License: EPL
URL: http://sblim.wiki.sourceforge.net/
Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
Patch0: sblim-wbemcli-1.5.1-gcc43.patch
Patch1: sblim-wbemcli-1.6.2-gcc47.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: curl-devel >= 7.9.3
@ -22,6 +23,7 @@ scripts.
%prep
%setup -q
%patch0 -p1 -b .gcc43
%patch1 -p1 -b .gcc47
%build
%configure CACERT=/etc/Pegasus/client.pem
@ -43,6 +45,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/%{name}
%changelog
* Thu Jan 05 2012 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-2
- Fix gcc47 compile failure
* Tue Jul 19 2011 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.6.2-1
- Update to sblim-wbemcli-1.6.2