Fix build with latest zilb 1.2.7.

Signed-off-by: Gang Wei <gang.wei@intel.com>
This commit is contained in:
Gang Wei 2012-08-22 01:40:07 -04:00
parent fa60a86a11
commit 2d31b682d8
2 changed files with 47 additions and 0 deletions

View File

@ -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);

View File

@ -9,6 +9,7 @@ Group: System Environment/Base
License: BSD License: BSD
URL: http://sourceforge.net/projects/tboot/ URL: http://sourceforge.net/projects/tboot/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz 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) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: trousers-devel openssl-devel BuildRequires: trousers-devel openssl-devel
@ -22,6 +23,7 @@ and verified launch of an OS kernel/VMM.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .zlib-fix
%build %build
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
@ -60,6 +62,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Wed Aug 22 2012 Gang Wei <gang.wei@intel.com> - 1:1.7.0-2
- Fix build error with zlib 1.2.7
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.7.0-2 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild