]> granicus.if.org Git - php/commitdiff
Fixed bug #79678 Build fails due to undeclared ZIP_RDONLY
authorRemi Collet <remi@php.net>
Sun, 7 Jun 2020 05:53:14 +0000 (07:53 +0200)
committerRemi Collet <remi@php.net>
Sun, 7 Jun 2020 05:53:26 +0000 (07:53 +0200)
ext/zip/php_zip.c

index f131966c1ffaaf328207bea0038f031ecdb82112..b275985fa885528f0da9981e3eef605418f5a5b9 100644 (file)
@@ -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 */