Skip to content

Commit f6bfbe9

Browse files
committed
Fix build for libzip < 0.11.2
We must not define method entries, if the actual method definitions or the arginfo structures are not defined.
1 parent 37d27e6 commit f6bfbe9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/zip/php_zip.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3127,10 +3127,12 @@ static const zend_function_entry zip_class_functions[] = {
31273127
ZIPARCHIVE_ME(getFromName, arginfo_ziparchive_getfromname, ZEND_ACC_PUBLIC)
31283128
ZIPARCHIVE_ME(getFromIndex, arginfo_ziparchive_getfromindex, ZEND_ACC_PUBLIC)
31293129
ZIPARCHIVE_ME(getStream, arginfo_ziparchive_getstream, ZEND_ACC_PUBLIC)
3130+
#ifdef ZIP_OPSYS_DEFAULT
31303131
ZIPARCHIVE_ME(setExternalAttributesName, arginfo_ziparchive_setextattrname, ZEND_ACC_PUBLIC)
31313132
ZIPARCHIVE_ME(setExternalAttributesIndex, arginfo_ziparchive_setextattrindex, ZEND_ACC_PUBLIC)
31323133
ZIPARCHIVE_ME(getExternalAttributesName, arginfo_ziparchive_getextattrname, ZEND_ACC_PUBLIC)
31333134
ZIPARCHIVE_ME(getExternalAttributesIndex, arginfo_ziparchive_getextattrindex, ZEND_ACC_PUBLIC)
3135+
#endif
31343136
ZIPARCHIVE_ME(setCompressionName, arginfo_ziparchive_setcompname, ZEND_ACC_PUBLIC)
31353137
ZIPARCHIVE_ME(setCompressionIndex, arginfo_ziparchive_setcompindex, ZEND_ACC_PUBLIC)
31363138
#ifdef HAVE_ENCRYPTION

0 commit comments

Comments
 (0)