]> granicus.if.org Git - php/commitdiff
Fix build for libzip < 0.11.2
authorChristoph M. Becker <cmbecker69@gmx.de>
Sun, 29 Sep 2019 11:31:22 +0000 (13:31 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sun, 29 Sep 2019 11:33:18 +0000 (13:33 +0200)
We must not define method entries, if the actual method definitions or
the arginfo structures are not defined.

ext/zip/php_zip.c

index d83272f56400068f168a95b4645487b7307d4445..7f7880dd6c8949d6f1058bcc2be8e8c4189ebe87 100644 (file)
@@ -3127,10 +3127,12 @@ static const zend_function_entry zip_class_functions[] = {
        ZIPARCHIVE_ME(getFromName,                      arginfo_ziparchive_getfromname, ZEND_ACC_PUBLIC)
        ZIPARCHIVE_ME(getFromIndex,                     arginfo_ziparchive_getfromindex, ZEND_ACC_PUBLIC)
        ZIPARCHIVE_ME(getStream,                        arginfo_ziparchive_getstream, ZEND_ACC_PUBLIC)
+#ifdef ZIP_OPSYS_DEFAULT
        ZIPARCHIVE_ME(setExternalAttributesName,        arginfo_ziparchive_setextattrname, ZEND_ACC_PUBLIC)
        ZIPARCHIVE_ME(setExternalAttributesIndex,       arginfo_ziparchive_setextattrindex, ZEND_ACC_PUBLIC)
        ZIPARCHIVE_ME(getExternalAttributesName,        arginfo_ziparchive_getextattrname, ZEND_ACC_PUBLIC)
        ZIPARCHIVE_ME(getExternalAttributesIndex,       arginfo_ziparchive_getextattrindex, ZEND_ACC_PUBLIC)
+#endif
        ZIPARCHIVE_ME(setCompressionName,               arginfo_ziparchive_setcompname, ZEND_ACC_PUBLIC)
        ZIPARCHIVE_ME(setCompressionIndex,              arginfo_ziparchive_setcompindex, ZEND_ACC_PUBLIC)
 #ifdef HAVE_ENCRYPTION