fix build without brotli
authorMichael Wallner <mike@php.net>
Tue, 27 Feb 2018 14:29:13 +0000 (15:29 +0100)
committerMichael Wallner <mike@php.net>
Tue, 27 Feb 2018 14:29:13 +0000 (15:29 +0100)
src/php_http_encoding.c

index e4d016ecb6e3ba80e2a65399b5dcb8d5ad1c4098..c20e1630b4efcdbca028d94dd124b1695d03d8f9 100644 (file)
@@ -538,10 +538,12 @@ static PHP_METHOD(HttpEncodingStream, __construct)
                ops = php_http_encoding_stream_get_inflate_ops();
        } else if (instanceof_function(obj->zo.ce, php_http_dechunk_stream_class_entry)) {
                ops = &php_http_encoding_dechunk_ops;
+#if PHP_HTTP_HAVE_LIBBROTLI
        } else if (instanceof_function(obj->zo.ce, php_http_get_enbrotli_stream_class_entry())) {
                ops = php_http_encoding_stream_get_enbrotli_ops();
        } else if (instanceof_function(obj->zo.ce, php_http_get_debrotli_stream_class_entry())) {
                ops = php_http_encoding_stream_get_debrotli_ops();
+#endif
        } else {
                php_http_throw(runtime, "Unknown http\\Encoding\\Stream class '%s'", obj->zo.ce->name->val);
                return;