From 528f302feff2b98f57b3cd5845ace9b1c3ef0e7e Mon Sep 17 00:00:00 2001 From: Brian Shire Date: Fri, 8 May 2009 03:32:54 +0000 Subject: [PATCH] Add missing #ifdef for curl version that does not have FTP_FILEMETHOD or IPRESOLVE options. related to fix for bug #39637 --- ext/curl/interface.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 807d0a96ab..1c5263eaa3 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -448,10 +448,12 @@ PHP_MINIT_FUNCTION(curl) of options and which version they were introduced */ /* Constants for curl_setopt() */ +#if LIBCURL_VERSION_NUM > 0x070a07 /* CURLOPT_IPRESOLVE is available since curl 7.10.8 */ REGISTER_CURL_CONSTANT(CURLOPT_IPRESOLVE); REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_WHATEVER); REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V4); REGISTER_CURL_CONSTANT(CURL_IPRESOLVE_V6); +#endif REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE); REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT); REGISTER_CURL_CONSTANT(CURLOPT_PORT); @@ -1541,8 +1543,12 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu case CURLOPT_REDIR_PROTOCOLS: case CURLOPT_PROTOCOLS: #endif +#if LIBCURL_VERSION_NUM > 0x070a07 /* CURLOPT_IPRESOLVE is available since curl 7.10.8 */ case CURLOPT_IPRESOLVE: +#endif +#if LIBCURL_VERSION_NUM >= 0x070f01 case CURLOPT_FTP_FILEMETHOD: +#endif convert_to_long_ex(zvalue); error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue)); break; -- 2.50.1