Include patch to fix fd.open calls with recent glibc.

This commit is contained in:
Matthias Saou 2007-08-23 09:35:35 +00:00
parent 1e99194169
commit 76602ace11
2 changed files with 57 additions and 4 deletions

View File

@ -0,0 +1,45 @@
diff -Naupr zziplib-0.13.49.orig/zzip/file.c zziplib-0.13.49/zzip/file.c
--- zziplib-0.13.49.orig/zzip/file.c 2007-03-18 16:20:12.000000000 +0100
+++ zziplib-0.13.49/zzip/file.c 2007-08-23 11:17:34.000000000 +0200
@@ -713,7 +713,7 @@ zzip_open_shared_io (ZZIP_FILE* stream,
{
zzip_plugin_io_t os = (o_modes & ZZIP_ALLOWREAL)
? zzip_get_default_io () : io;
- int fd = os->fd.open(filename, o_flags); /* io->fd.open */
+ int fd = (os->fd.open)(filename, o_flags); /* io->fd.open */
if (fd != -1)
{
ZZIP_FILE* fp = calloc (1, sizeof(ZZIP_FILE));
diff -Naupr zziplib-0.13.49.orig/zzip/write.c zziplib-0.13.49/zzip/write.c
--- zziplib-0.13.49.orig/zzip/write.c 2007-03-18 16:22:11.000000000 +0100
+++ zziplib-0.13.49/zzip/write.c 2007-08-23 11:17:46.000000000 +0200
@@ -163,7 +163,7 @@ zzip_dir_creat_ext_io(zzip_char_t* name,
if (! (exx_len = strlen (*exx)) || exx_len >= MAX_EXT_LEN) break;
memcpy (dir->realname+name_len, exx, exx_len); /* append! */
}____;
- fd = io->fd.open (dir->realname, O_CREAT|O_TRUNC|O_WRONLY, o_mode);
+ fd = (io->fd.open)(dir->realname, O_CREAT|O_TRUNC|O_WRONLY, o_mode);
dir->realname[name_len] = '\0'; /* keep ummodified */
if (fd != -1) { dir->fd = fd; return dir; }
error:
diff -Naupr zziplib-0.13.49.orig/zzip/zip.c zziplib-0.13.49/zzip/zip.c
--- zziplib-0.13.49.orig/zzip/zip.c 2007-03-18 16:27:49.000000000 +0100
+++ zziplib-0.13.49/zzip/zip.c 2007-08-23 11:17:22.000000000 +0200
@@ -688,7 +688,7 @@ __zzip_try_open(zzip_char_t* filename, i
for ( ; *ext ; ++ext)
{
strcpy (file+len, *ext);
- fd = io->fd.open(file, filemode);
+ fd = (io->fd.open)(file, filemode);
if (fd != -1) return fd;
}
return -1;
@@ -718,7 +718,7 @@ zzip_dir_open_ext_io(zzip_char_t* filena
if (! io) io = zzip_get_default_io();
if (! ext) ext = zzip_get_default_ext();
- fd = io->fd.open(filename, O_RDONLY|O_BINARY);
+ fd = (io->fd.open)(filename, O_RDONLY|O_BINARY);
if (fd != -1) {
return zzip_dir_fdopen_ext_io(fd, e, ext, io);
} else

View File

@ -1,13 +1,15 @@
Summary: Lightweight library to easily extract data from zip files
Name: zziplib
Version: 0.13.49
Release: 3%{?dist}
License: LGPLv2+ or MPL
Release: 4%{?dist}
License: LGPLv2+ or MPLv1.1
Group: Applications/Archiving
URL: http://zziplib.sourceforge.net/
Source: http://dl.sf.net/zziplib/zziplib-%{version}.tar.bz2
Patch0: zziplib-0.13.49-open.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: zlib-devel, zip, python, SDL-devel, xmlto, pkgconfig, automake
BuildRequires: zlib-devel, zip, python, SDL-devel, xmlto, pkgconfig
BuildRequires: autoconf, automake
%description
The zziplib library is intentionally lightweight, it offers the ability to
@ -50,6 +52,7 @@ zziplib library.
%prep
%setup -q
%patch0 -p1
%build
@ -60,7 +63,8 @@ zziplib library.
# Remove rpath on 64bit archs
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' */libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' */libtool
%{__make} %{?_smp_mflags}
# Disable _smp_mflags because docs fail to build (as of 0.13.49)
%{__make}
%install
@ -99,6 +103,10 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' */libtool
%changelog
* Wed Aug 8 2007 Matthias Saou <http://freshrpms.net/> 0.13.49-4
- Include patch to fix fd.open calls with recent glibc.
- Disable _smp_mflags since the docs fail to build.
* Fri Aug 3 2007 Matthias Saou <http://freshrpms.net/> 0.13.49-3
- Update License field.