[tboot/f18] Fix build with new zlib 1.2.7
gwei3
gwei3 at fedoraproject.org
Wed Aug 22 06:29:33 UTC 2012
commit ae492e3b8bc01be7d0934ac9b9f8288b77ea6995
Author: Gang Wei <gang.wei at intel.com>
Date: Wed Aug 22 02:28:07 2012 -0400
Fix build with new zlib 1.2.7
Signed-off-by: Gang Wei <gang.wei at intel.com>
tboot-1.7.0-zlib-fix.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
tboot.spec | 5 +++++
2 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/tboot-1.7.0-zlib-fix.patch b/tboot-1.7.0-zlib-fix.patch
new file mode 100644
index 0000000..bac03aa
--- /dev/null
+++ b/tboot-1.7.0-zlib-fix.patch
@@ -0,0 +1,42 @@
+diff -r 7db3c64d7b75 lcptools/mlehash.c
+--- a/lcptools/mlehash.c Wed Aug 22 11:49:46 2012 +0800
++++ b/lcptools/mlehash.c Wed Aug 22 12:14:03 2012 +0800
+@@ -233,7 +233,7 @@
+ */
+ static bool read_file(const char *filename, void **buffer, size_t *length)
+ {
+- FILE *fcompressed = NULL;
++ gzFile fcompressed = NULL;
+ FILE *fdecompressed = NULL;
+ struct stat filestat;
+ char tmpbuffer[1024];
+diff -r 7db3c64d7b75 tb_polgen/commands.c
+--- a/tb_polgen/commands.c Wed Aug 22 11:49:46 2012 +0800
++++ b/tb_polgen/commands.c Wed Aug 22 12:14:03 2012 +0800
+@@ -60,7 +60,7 @@
+ int read_cnt;
+
+ if ( unzip )
+- f = gzopen(filename, "rb");
++ f = (FILE *)gzopen(filename, "rb");
+ else
+ f = fopen(filename, "rb");
+
+@@ -73,7 +73,7 @@
+ EVP_DigestInit(&ctx, md);
+ do {
+ if ( unzip )
+- read_cnt = gzread(f, buf, sizeof(buf));
++ read_cnt = gzread((gzFile)f, buf, sizeof(buf));
+ else
+ read_cnt = fread(buf, 1, sizeof(buf), f);
+ if ( read_cnt == 0 )
+@@ -84,7 +84,7 @@
+ EVP_DigestFinal(&ctx, hash->sha1, NULL);
+
+ if ( unzip )
+- gzclose(f);
++ gzclose((gzFile)f);
+ else
+ fclose(f);
+
diff --git a/tboot.spec b/tboot.spec
index 5b078eb..0639d89 100644
--- a/tboot.spec
+++ b/tboot.spec
@@ -9,6 +9,7 @@ Group: System Environment/Base
License: BSD
URL: http://sourceforge.net/projects/tboot/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Patch0: tboot-1.7.0-zlib-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: trousers-devel openssl-devel
@@ -22,6 +23,7 @@ and verified launch of an OS kernel/VMM.
%prep
%setup -q
+%patch0 -p1 -b .zlib-fix
%build
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
@@ -60,6 +62,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Aug 22 2012 Gang Wei <gang.wei at intel.com> - 1:1.7.0-2
+- Fix build error with zlib 1.2.7
+
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:1.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list