X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_client_curl.c;h=df2bb11b6358a4408226268f8c91247900e6e1e2;hp=c46ffca3f73bf2f248edd9fc9f022f9ea9ceac80;hb=3d2d2a1c7727f26905863e6ac72e1e021fea133f;hpb=48c11a71a485ca29c47aebd601d8d77d9bfeb129 diff --git a/php_http_client_curl.c b/php_http_client_curl.c index c46ffca..df2bb11 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -1148,7 +1148,7 @@ static STATUS php_http_curle_option_set_resolve(php_http_option_t *opt, zval *va } #endif -#if PHP_HTTP_CURL_VERSION(7,21,4) +#if PHP_HTTP_CURL_VERSION(7,21,4) && defined(PHP_HTTP_CURL_TLSAUTH_SRP) static STATUS php_http_curle_option_set_ssl_tlsauthtype(php_http_option_t *opt, zval *val, void *userdata) { php_http_client_curl_handler_t *curl = userdata; @@ -1470,7 +1470,7 @@ static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC) opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_BASEDIR; } #endif -#if PHP_HTTP_CURL_VERSION(7,21,4) +#if PHP_HTTP_CURL_VERSION(7,21,4) && defined(PHP_HTTP_CURL_TLSAUTH_SRP) if ((opt = php_http_option_register(registry, ZEND_STRL("tlsauthtype"), CURLOPT_TLSAUTH_TYPE, IS_LONG))) { opt->setter = php_http_curle_option_set_ssl_tlsauthtype; } @@ -1701,7 +1701,7 @@ static void php_http_curlm_options_init(php_http_options_t *registry TSRMLS_DC) } #endif /* events */ -#ifdef PHP_HTTP_HAVE_EVENT +#if PHP_HTTP_HAVE_EVENT if ((opt = php_http_option_register(registry, ZEND_STRL("use_eventloop"), 0, IS_BOOL))) { opt->setter = php_http_curlm_option_set_use_eventloop; } @@ -2467,7 +2467,7 @@ PHP_MINIT_FUNCTION(http_client_curl) REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "SSL_VERSION_SSLv2", CURL_SSLVERSION_SSLv2, CONST_CS|CONST_PERSISTENT); REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "SSL_VERSION_SSLv3", CURL_SSLVERSION_SSLv3, CONST_CS|CONST_PERSISTENT); REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "SSL_VERSION_ANY", CURL_SSLVERSION_DEFAULT, CONST_CS|CONST_PERSISTENT); -#if PHP_HTTP_CURL_VERSION(7,21,4) +#if PHP_HTTP_CURL_VERSION(7,21,4) && defined(PHP_HTTP_CURL_TLSAUTH_SRP) REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "TLSAUTH_SRP", CURL_TLSAUTH_SRP, CONST_CS|CONST_PERSISTENT); #endif