diff options
author | Antony Dovgal <tony2001@php.net> | 2006-09-15 13:43:55 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-09-15 13:43:55 +0000 |
commit | b6596bebc79706362d835fe08b866060869effc7 (patch) | |
tree | 4779984d85657e0041a9d7fc3971d37393931b84 | |
parent | a072c661842311798d03568df4e9e422b75c8586 (diff) | |
download | php-git-b6596bebc79706362d835fe08b866060869effc7.tar.gz |
fix #38844 (curl_easy_strerror() is defined only since cURL 7.12.0)
-rw-r--r-- | ext/curl/config.m4 | 8 | ||||
-rw-r--r-- | ext/curl/streams.c | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ext/curl/config.m4 b/ext/curl/config.m4 index 941df3c970..33f0742fff 100644 --- a/ext/curl/config.m4 +++ b/ext/curl/config.m4 @@ -101,6 +101,14 @@ if test "$PHP_CURL" != "no"; then $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR ]) + PHP_CHECK_LIBRARY(curl,curl_easy_strerror, + [ + AC_DEFINE(HAVE_CURL_EASY_STRERROR,1,[ ]) + ],[],[ + $CURL_LIBS -L$CURL_DIR/$PHP_LIBDIR + ]) + + if test "$PHP_CURLWRAPPERS" != "no" ; then AC_DEFINE(PHP_CURL_URL_WRAPPERS,1,[ ]) fi diff --git a/ext/curl/streams.c b/ext/curl/streams.c index 2dfd49c43d..b1d19e2e07 100644 --- a/ext/curl/streams.c +++ b/ext/curl/streams.c @@ -445,7 +445,9 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, if (msg->data.result == CURLE_OK) { continue; } else { +#if HAVE_CURL_EASY_STRERROR php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", curl_easy_strerror(msg->data.result)); +#endif msg_found++; } } |