Skip to content

PHP-8.2.2: Build failure due to modern libxml #6

Description

@mal-tee

Description

Libxml 2.14.0 removed the UNUSED_ATTRIBUTE macro, which php-src in our 8.2.2 version depends upon.

GNOME/libxml2@208f27f

Hotfixes:

  • std=c99 to ignore other build errors
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 270a0367481..559e8691696 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -419,7 +419,7 @@ php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc)
 static xmlOutputBufferPtr
 php_libxml_output_buffer_create_filename(const char *URI,
                               xmlCharEncodingHandlerPtr encoder,
-                              int compression ATTRIBUTE_UNUSED)
+                              int compression)
 {
        xmlOutputBufferPtr ret;
        xmlURIPtr puri;
@@ -942,7 +942,7 @@ PHP_FUNCTION(libxml_use_internal_errors)
                        LIBXML(error_list) = NULL;
                }
        } else {
-               xmlSetStructuredErrorFunc(NULL, php_libxml_structured_error_handler);
+               xmlSetStructuredErrorFunc(NULL, NULL);
                if (LIBXML(error_list) == NULL) {
                        LIBXML(error_list) = (zend_llist *) emalloc(sizeof(zend_llist));
                        zend_llist_init(LIBXML(error_list), sizeof(xmlError), _php_libxml_free_error, 0);

PHP Version

PHP-8.2.2-dev

Operating System

arch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions