From 1acbc4e27340a3b9760bdf7a23e431b8f9004306 Mon Sep 17 00:00:00 2001 From: Bolehu Date: Mon, 12 Jun 2023 04:19:53 +0800 Subject: [PATCH] Return false instead of -1 Signed-off-by: Bolehu --- backport-Return-false-instead-of-1.patch | 29 ++++++++++++++++++++++++ libzip.spec | 7 +++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 backport-Return-false-instead-of-1.patch diff --git a/backport-Return-false-instead-of-1.patch b/backport-Return-false-instead-of-1.patch new file mode 100644 index 0000000..c359421 --- /dev/null +++ b/backport-Return-false-instead-of-1.patch @@ -0,0 +1,29 @@ +From 0c955aa208411eac10a067c72ce2e642697fd533 Mon Sep 17 00:00:00 2001 +From: Thomas Klausner +Date: Sat, 19 Jun 2021 19:24:43 +0200 +Subject: [PATCH] Return false instead of -1. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Noted by RafaƂ Mikrut in #245 +--- + lib/zip_source_file_win32.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/zip_source_file_win32.c b/lib/zip_source_file_win32.c +index 6547fc20..0dea2c11 100644 +--- a/lib/zip_source_file_win32.c ++++ b/lib/zip_source_file_win32.c +@@ -115,7 +115,7 @@ _zip_win32_op_seek(zip_source_file_context_t *ctx, void *f, zip_int64_t offset, + break; + default: + zip_error_set(&ctx->error, ZIP_ER_SEEK, EINVAL); +- return -1; ++ return false; + } + + li.QuadPart = (LONGLONG)offset; +-- +2.36.1 + diff --git a/libzip.spec b/libzip.spec index e742a6d..160617d 100644 --- a/libzip.spec +++ b/libzip.spec @@ -1,11 +1,13 @@ Name: libzip Version: 1.8.0 -Release: 1 +Release: 2 Summary: A C library for reading, creating, and modifying zip archives License: BSD URL: https://libzip.org/ Source0: https://libzip.org/download/libzip-%{version}.tar.xz +Patch6000: backport-Return-false-instead-of-1.patch + BuildRequires: gcc zlib-devel bzip2-devel openssl-devel cmake BuildRequires: perl-interpreter perl(Cwd) perl(File::Copy) perl(File::Path) perl(Getopt::Long) BuildRequires: perl(IPC::Open3) perl(Storable) perl(Symbol) perl(UNIVERSAL) perl(strict) perl(warnings) @@ -72,6 +74,9 @@ make test %changelog +* Mon Jul 31 2023 Bolehu - 1.8.0-2 +- Return false instead of -1 + * Thu Apr 21 2022 Yangping - 1.8.0-1 - Update to 1.8.0 -- Gitee