diff options
| author | Xin LI <delphij@FreeBSD.org> | 2013-10-16 17:16:40 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2013-10-16 17:16:40 +0000 |
| commit | 86ccd3e00f142985fe1198c697a6f07f9f3d2349 (patch) | |
| tree | cb36ee81a4604aff5a6bf817cd829cb0f26466d7 /lib/libz | |
| parent | ec7935bfef62ef10a1e5e82f899aeec56ac07591 (diff) | |
Notes
Diffstat (limited to 'lib/libz')
| -rw-r--r-- | lib/libz/zopen.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libz/zopen.c b/lib/libz/zopen.c index 822a5e1c0335d..d570c9864aa25 100644 --- a/lib/libz/zopen.c +++ b/lib/libz/zopen.c @@ -29,6 +29,12 @@ xgzclose(void *cookie) return gzclose(cookie); } +static fpos_t +xgzseek(void *cookie, fpos_t offset, int whence) +{ + return gzseek(cookie, (z_off_t)offset, whence); +} + FILE * zopen(const char *fname, const char *mode) { @@ -37,7 +43,7 @@ zopen(const char *fname, const char *mode) return NULL; if(*mode == 'r') - return (funopen(gz, xgzread, NULL, NULL, xgzclose)); + return (funopen(gz, xgzread, NULL, xgzseek, xgzclose)); else - return (funopen(gz, NULL, xgzwrite, NULL, xgzclose)); + return (funopen(gz, NULL, xgzwrite, xgzseek, xgzclose)); } |
