From 2deab3ba28070e28822349a22a53abdf3a9509ea Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Sun, 15 Feb 2015 09:59:21 +0100 Subject: [PATCH] fix build without libevent2 and TLS_AUTH_SRP support --- php_http_client_curl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.30.2