]> granicus.if.org Git - php/commitdiff
MFH: fix #38844 (curl_easy_strerror() is defined only since cURL 7.12.0)
authorAntony Dovgal <tony2001@php.net>
Fri, 15 Sep 2006 13:44:50 +0000 (13:44 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 15 Sep 2006 13:44:50 +0000 (13:44 +0000)
NEWS
ext/curl/config.m4
ext/curl/streams.c

diff --git a/NEWS b/NEWS
index 36297bac668f5e1b861354ee44280f12e1dfe720..441175f3a8de8bce3fa7605fda635c9210c9a93a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? Sep 2006, PHP 5.2.0
+- Fixed bug #38844 (curl_easy_strerror() is defined only since cURL 7.12.0).
+  (Tony)
 
 14 Sep 2006, PHP 5.2.0RC4
 - Added DSA key generation support to openssl_pkey_new(), FR #38731
index c93c118d1b871939b419230ccab7a2d21939d90a..00b410b357d0f20b0325c5040b05eb7c99cc4bd9 100644 (file)
@@ -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
index ef41a2dc6924ae5fa7c2c0c8a9cfd8c2942347e9..dd7fcd94a9189eee347eedf7a3c25177b45513f7 100644 (file)
@@ -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++;
                        }
                }