From a3bfd4a1082f00eecde9c1feddbdb8adf4a928da Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 7 Jun 2020 07:53:14 +0200 Subject: Fixed bug #79678 Build fails due to undeclared ZIP_RDONLY --- ext/zip/php_zip.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/zip/php_zip.c') diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index f131966c1f..b275985fa8 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1456,7 +1456,11 @@ PHP_METHOD(ZipArchive, open) "Do not accept empty files as valid zip archives any longer" */ /* open for write without option to empty the archive */ +#ifdef ZIP_RDONLY if ((flags & (ZIP_TRUNCATE | ZIP_RDONLY)) == 0) { +#else + if ((flags & ZIP_TRUNCATE) == 0) { +#endif zend_stat_t st; /* exists and is empty */ -- cgit v1.2.1