From 0ae0daeefedfefb67e4dd53511e3b0bb53bed812 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Mon, 2 Mar 2009 12:04:05 +0000 Subject: [PATCH] Fix for gcc44 --- ...-WCtype.patch => afflib-3.3.4-WCtype.patch | 14 ++++++------ afflib-3.3.4-gcc44.patch | 22 +++++++++++++++++++ afflib.spec | 13 ++++++----- 3 files changed, 37 insertions(+), 12 deletions(-) rename afflib-3.0.1-WCtype.patch => afflib-3.3.4-WCtype.patch (64%) create mode 100644 afflib-3.3.4-gcc44.patch diff --git a/afflib-3.0.1-WCtype.patch b/afflib-3.3.4-WCtype.patch similarity index 64% rename from afflib-3.0.1-WCtype.patch rename to afflib-3.3.4-WCtype.patch index a3dfa8d..bf3e757 100644 --- a/afflib-3.0.1-WCtype.patch +++ b/afflib-3.3.4-WCtype.patch @@ -1,9 +1,9 @@ -diff -up afflib-3.0.4/configure.ac.WCtype afflib-3.0.4/configure.ac ---- afflib-3.0.4/configure.ac.WCtype 2007-12-28 15:23:53.000000000 +0100 -+++ afflib-3.0.4/configure.ac 2007-12-28 15:25:59.000000000 +0100 -@@ -115,6 +115,18 @@ AC_CHECK_FUNCS([ftruncate memset mkdir p - # Special features that can be enabled or disabled - AC_ARG_ENABLE([noopt], AC_HELP_STRING([--enable-noopt],[Drop -O C flags])) +diff -up afflib-3.3.4/configure.ac.WCtype afflib-3.3.4/configure.ac +--- afflib-3.3.4/configure.ac.WCtype 2008-09-29 21:45:05.000000000 +0200 ++++ afflib-3.3.4/configure.ac 2009-03-02 11:58:36.000000000 +0100 +@@ -101,6 +101,18 @@ AC_LANG_POP([C++]) + + +AS_IF([test "x$ac_afflib_enable_wide_character_type" != xno ], + [AC_DEFINE([HAVE_WIDE_CHARACTER_TYPE],[1],[Defines if wide character type should be used]) @@ -19,4 +19,4 @@ diff -up afflib-3.0.4/configure.ac.WCtype afflib-3.0.4/configure.ac + ################################################################ ## LIBEWF support - AC_ARG_ENABLE([libewf], + dnl Function to test if a libewf_get_media_size takes value as an argument diff --git a/afflib-3.3.4-gcc44.patch b/afflib-3.3.4-gcc44.patch new file mode 100644 index 0000000..b3ea15c --- /dev/null +++ b/afflib-3.3.4-gcc44.patch @@ -0,0 +1,22 @@ +diff -up afflib-3.3.4/tools/afverify.cpp.gcc44 afflib-3.3.4/tools/afverify.cpp +--- afflib-3.3.4/tools/afverify.cpp.gcc44 2008-07-21 06:25:29.000000000 +0200 ++++ afflib-3.3.4/tools/afverify.cpp 2009-03-02 12:48:59.000000000 +0100 +@@ -240,12 +240,16 @@ string get_xml_field(const char *buf,con + int verify_bom_signature(AFFILE *af,const char *buf) + { + const char *cce = "\n"; +- char *chain_end = strstr(buf,cce); ++ char *buf_tmp; ++ char *cce_tmp; ++ strcpy(buf_tmp, buf); ++ strcpy(cce_tmp, cce); ++ char *chain_end = strstr(buf_tmp,cce_tmp); + if(!chain_end){ + warn("end of chain XML can't be found\n"); + return -1; // can't find it + } +- char *sig_start = chain_end + strlen(cce); ++ char *sig_start = chain_end + strlen(cce_tmp); + + BIO *seg = BIO_new_mem_buf((void *)buf,strlen(buf)); + BIO_seek(seg,0); diff --git a/afflib.spec b/afflib.spec index 3baeab9..858619e 100644 --- a/afflib.spec +++ b/afflib.spec @@ -1,15 +1,14 @@ -%define _default_patch_fuzz 2 - Name: afflib Version: 3.3.4 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Library to support the Advanced Forensic Format Group: System Environment/Libraries License: BSD with advertising URL: http://www.afflib.org Source0: http://www.afflib.org/downloads/afflib-%{version}.tar.gz -Patch0: afflib-3.0.1-WCtype.patch +Patch0: afflib-3.3.4-WCtype.patch +Patch1: afflib-3.3.4-gcc44.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool @@ -59,6 +58,7 @@ developing applications that use %{name}. %prep %setup -q %patch0 -p1 -b .WCtype +%patch1 -p1 -b .gcc44 # prevent internal lzma to be built - testing #rm -rf lzma443 @@ -68,7 +68,7 @@ chmod 0644 lib/base64.cpp # Autoreconf autoreconf -libtoolize +libtoolize --force %build @@ -123,6 +123,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Mar 2 2009 kwizart < kwizart at gmail.com > - 3.3.4-7 +- Fix for gcc44 + * Mon Feb 23 2009 Fedora Release Engineering - 3.3.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild