php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48350 compilation fails with `CURLOPT_FTP_FILEMETHOD` undeclared
Submitted: 2009-05-21 08:28 UTC Modified: 2009-05-21 09:17 UTC
From: margus at zone dot ee Assigned:
Status: Closed Package: cURL related
PHP Version: 5.3.0RC2 OS: Linux
Private report: No CVE-ID: None
 [2009-05-21 08:28 UTC] margus at zone dot ee
Description:
------------
Compilation fails when building curl extension against curl 7.12.1

Suggested patch:

--- ext/curl/interface.c 2009-05-21 11:27:20.000000000 +0300
+++ ext/curl/interface.c.patched 2009-05-21 11:27:17.000000000 +0300
@@ -1529,10 +1529,12 @@
                case CURLOPT_PROTOCOLS:
 #endif
                case CURLOPT_IPRESOLVE:
+#if LIBCURL_VERSION_NUM >= 0x070f01
                case CURLOPT_FTP_FILEMETHOD:
                        convert_to_long_ex(zvalue);
                        error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
                        break;
+#endif
                case CURLOPT_FOLLOWLOCATION:
                        convert_to_long_ex(zvalue);
                        if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {

Reproduce code:
---------------
./configure --with-curl && make

Expected result:
----------------
Build complete.
Don't forget to run 'make test'.

Actual result:
--------------
/XXX/php-5.3.0/ext/curl/interface.c: In function `_php_curl_setopt':
/XXX/php-5.3.0/ext/curl/interface.c:1532: error: `CURLOPT_FTP_FILEMETHOD' undeclared (first use in this function)
/XXX/php-5.3.0/ext/curl/interface.c:1532: error: (Each undeclared identifier is reported only once
/XXX/php-5.3.0/ext/curl/interface.c:1532: error: for each function it appears in.)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-21 09:17 UTC] pajoye@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 23:01:29 2024 UTC