From 355657e3a8248fd39b122f01072d080b9c87e72d Mon Sep 17 00:00:00 2001 From: Weilin Du Date: Sat, 31 Oct 2026 18:38:48 +0800 Subject: [PATCH] ext/zip: Remove libzip < 1.0 compatibility code --- ext/zip/php_zip.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 5baecfc18933..a278a3d6ac8c 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -138,26 +138,15 @@ static char * php_zip_make_relative_path(char *path, size_t path_len) /* {{{ */ /* }}} */ /* {{{ php_zip_file_error - Entry error code, plus its message when message is not NULL. - zip_error_t and its accessors only exist since libzip 1.0. */ + Entry error code, plus its message when message is not NULL. */ static int php_zip_file_error(struct zip_file *zf, const char **message) { -#if LIBZIP_VERSION_MAJOR < 1 - int zep, syp; - - zip_file_error_get(zf, &zep, &syp); - if (message) { - *message = zip_file_strerror(zf); - } - return zep; -#else zip_error_t *err = zip_file_get_error(zf); if (message) { *message = zip_error_strerror(err); } return zip_error_code_zip(err); -#endif } /* }}} */