zziplib/zziplib-0.13.49-open.patch

46 lines
2.1 KiB
Diff

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