[dansguardian] Fix compilation with GCC 4.7

Petr Pisar ppisar at fedoraproject.org
Wed Feb 15 14:35:51 UTC 2012


commit 07a9df44465eb79a40bf46baa3a1476c491167ae
Author: Petr Písař <ppisar at redhat.com>
Date:   Wed Feb 15 15:33:21 2012 +0100

    Fix compilation with GCC 4.7

 ...an-2.10.1.1-Include-stddef.h-for-offsetof.patch |   24 ++++++++++++++++++++
 dansguardian.spec                                  |    4 +++
 2 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/dansguardian-2.10.1.1-Include-stddef.h-for-offsetof.patch b/dansguardian-2.10.1.1-Include-stddef.h-for-offsetof.patch
new file mode 100644
index 0000000..5fa65f4
--- /dev/null
+++ b/dansguardian-2.10.1.1-Include-stddef.h-for-offsetof.patch
@@ -0,0 +1,24 @@
+From ba141213c6636584ec3c98035255dea47103a6ef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Wed, 15 Feb 2012 15:30:39 +0100
+Subject: [PATCH] Include <stddef.h> for offsetof()
+
+---
+ src/authplugins/ntlm.cpp |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/src/authplugins/ntlm.cpp b/src/authplugins/ntlm.cpp
+index 8e5379b..ba90497 100644
+--- a/src/authplugins/ntlm.cpp
++++ b/src/authplugins/ntlm.cpp
+@@ -30,6 +30,7 @@
+ 
+ #include <iconv.h>
+ 
++#include <stddef.h>
+ 
+ // DEFINES
+ 
+-- 
+1.7.7.6
+
diff --git a/dansguardian.spec b/dansguardian.spec
index fa662dd..7d663ea 100644
--- a/dansguardian.spec
+++ b/dansguardian.spec
@@ -30,6 +30,8 @@ Patch2:         dansguardian-clamav095.patch
 Patch3:         dansguardian-must-be-successful.patch
 # Remove check for clamav version
 Patch4:         dansguardian-2.10.1.1-Do-no-check-for-clamav-version.patch
+# g++-4.7 does not provide sizeof() by default
+Patch5:         dansguardian-2.10.1.1-Include-stddef.h-for-offsetof.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:   clamav-devel pcre-devel zlib-devel
@@ -79,6 +81,7 @@ lokalen Netzwerk.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 autoconf
 
 %build
@@ -202,6 +205,7 @@ fi
 * Fri Feb 10 2012 Petr Pisar <ppisar at redhat.com> - 2.10.1.1-7
 - Rebuild against PCRE 8.30
 - Do not check for clamav version
+- Fix compilation with GCC 4.7
 
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.10.1.1-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild


More information about the scm-commits mailing list