From bc41b73428ad7013b2eccaa4320d6dbd324c35dc Mon Sep 17 00:00:00 2001 From: Jitesh Shah Date: Thu, 18 Jun 2009 13:10:41 +0200 Subject: [PATCH] Alignment fixes (Patch by Lennert) Signed-off-by: Jitesh Shah --- mhash-alignment.patch | 18 ++++++++++++++++++ mhash.spec | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletions(-) create mode 100644 mhash-alignment.patch diff --git a/mhash-alignment.patch b/mhash-alignment.patch new file mode 100644 index 0000000..97c4fc3 --- /dev/null +++ b/mhash-alignment.patch @@ -0,0 +1,18 @@ +diff -dur mhash-0.9.9.backup/lib/stdfns.c mhash-0.9.9/lib/stdfns.c +--- mhash-0.9.9.backup/lib/stdfns.c 2009-06-18 15:59:11.306557000 +0200 ++++ mhash-0.9.9/lib/stdfns.c 2009-06-18 15:59:58.006553488 +0200 +@@ -371,6 +371,13 @@ + bigptr1 = (mutils_word32 *) dest; + bigptr2 = (mutils_word32 *) src; + ++ /* copy byte-by-byte for small and/or unaligned copies */ ++ if ((n < 16) || ((mutils_word32)dest & 0x3) || ++((mutils_word32)src & 0x3)) ++ { ++ return mutils_memcpy8(dest, src, n); ++ } ++ + words = n >> 2; + remainder = n - (words << 2); + +Only in mhash-0.9.9/lib: stdfns.c.orig diff --git a/mhash.spec b/mhash.spec index a66091b..0a71f7e 100644 --- a/mhash.spec +++ b/mhash.spec @@ -4,13 +4,14 @@ Summary: Thread-safe hash algorithms library Name: mhash Version: 0.9.9 -Release: 7 +Release: 7.fa1 URL: http://mhash.sourceforge.net/ License: LGPLv2+ Group: System Environment/Libraries Source: http://download.sourceforge.net/mhash/mhash-%{version}.tar.bz2 Patch1: mhash-0.9.9-multiarch.patch Patch2: mutils-align.patch +Patch100: mhash-alignment.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n) Provides: libmhash = %{version}-%{release} @@ -43,6 +44,7 @@ develop programs that use the mhash library. %setup -q %patch1 -p1 -b .multiarch %patch2 -p1 -b .alignment +%patch100 -p1 -b .alignment1 %build @@ -95,6 +97,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jun 18 2009 Jitesh Shah - 0.9.9-7 +- Some alignment fixes (Patch by Lennert) + * Wed Feb 25 2009 Fedora Release Engineering - 0.9.9-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild -- 1.5.5.6