fix build with old libcurl
[m6w6/ext-http] / php_http_client_curl.c
index df2bb11b6358a4408226268f8c91247900e6e1e2..97408bddb469deb3901bd8ddd561880c0fd8e5dc 100644 (file)
@@ -934,6 +934,9 @@ static STATUS php_http_curle_option_set_compress(php_http_option_t *opt, zval *v
        php_http_client_curl_handler_t *curl = userdata;
        CURL *ch = curl->handle;
 
+#if !PHP_HTTP_CURL_VERSION(7,21,6)
+#      define CURLOPT_ACCEPT_ENCODING CURLOPT_ENCODING
+#endif
        if (CURLE_OK != curl_easy_setopt(ch, CURLOPT_ACCEPT_ENCODING, Z_BVAL_P(val) ? "" : NULL)) {
                return FAILURE;
        }