release 3.2.3
[m6w6/ext-http] / src / php_http_encoding_brotli.c
index a46a2f6af6f987e9dc3d77fb6496390e3e522980..dbea978db988d3f2944e10d2580a317b874e2a0f 100644 (file)
@@ -397,10 +397,17 @@ static zend_function_entry php_http_debrotli_stream_methods[] = {
        EMPTY_FUNCTION_ENTRY
 };
 
+/* POS */
+const void *BrotliGetDictionary();
+const void *(*php_http_brotli_get_dictionary)();
+
 PHP_MINIT_FUNCTION(http_encoding_brotli)
 {
        zend_class_entry ce;
 
+       /* force link to libbrotlicommon, because their libraries don't */
+       php_http_brotli_get_dictionary = BrotliGetDictionary();
+
        memset(&ce, 0, sizeof(ce));
        INIT_NS_CLASS_ENTRY(ce, "http\\Encoding\\Stream", "Enbrotli", php_http_enbrotli_stream_methods);
        php_http_enbrotli_stream_class_entry = zend_register_internal_class_ex(&ce, php_http_get_encoding_stream_class_entry());