From 138e5e7c1dfba4717a4e6d5abb1abb0f82d6f49f Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 1 Jan 2025 10:37:56 +0100 Subject: Windows: Update libzip to version 1.11.2 --- src/Common/libzip/zip_source_file_stdio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Common/libzip/zip_source_file_stdio.c') diff --git a/src/Common/libzip/zip_source_file_stdio.c b/src/Common/libzip/zip_source_file_stdio.c index 6dcc5639..fd16f392 100644 --- a/src/Common/libzip/zip_source_file_stdio.c +++ b/src/Common/libzip/zip_source_file_stdio.c @@ -1,6 +1,6 @@ /* zip_source_file_stdio.c -- read-only stdio file source implementation - Copyright (C) 2020 Dieter Baron and Thomas Klausner + Copyright (C) 2020-2023 Dieter Baron and Thomas Klausner This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at @@ -120,7 +120,7 @@ _zip_stdio_op_seek(zip_source_file_context_t *ctx, void *f, zip_int64_t offset, } #endif - if (fseeko((FILE *)f, (off_t)offset, whence) < 0) { + if (zip_os_fseek((FILE *)f, (zip_off_t)offset, whence) < 0) { zip_error_set(&ctx->error, ZIP_ER_SEEK, errno); return false; } @@ -130,15 +130,15 @@ _zip_stdio_op_seek(zip_source_file_context_t *ctx, void *f, zip_int64_t offset, bool _zip_stdio_op_stat(zip_source_file_context_t *ctx, zip_source_file_stat_t *st) { - struct stat sb; + zip_os_stat_t sb; int ret; if (ctx->fname) { - ret = stat(ctx->fname, &sb); + ret = zip_os_stat(ctx->fname, &sb); } else { - ret = fstat(fileno((FILE *)ctx->f), &sb); + ret = zip_os_fstat(fileno((FILE *)ctx->f), &sb); } if (ret < 0) { @@ -168,7 +168,7 @@ _zip_stdio_op_stat(zip_source_file_context_t *ctx, zip_source_file_stat_t *st) { zip_int64_t _zip_stdio_op_tell(zip_source_file_context_t *ctx, void *f) { - off_t offset = ftello((FILE *)f); + zip_off_t offset = zip_os_ftell((FILE *)f); if (offset < 0) { zip_error_set(&ctx->error, ZIP_ER_SEEK, errno); -- cgit v1.2.3