ports/65422: [PATCH] lang/php4: add patch to fix compiling with new cURL version

Toni Viemero toni.viemero at iki.fi
Sun Apr 11 00:40:20 UTC 2004


>Number:         65422
>Category:       ports
>Synopsis:       [PATCH] lang/php4: add patch to fix compiling with new cURL version
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 10 17:40:19 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Toni Viemero
>Release:        FreeBSD 5.2.1-RELEASE-p4 i386
>Organization:
>Environment:
System: FreeBSD iso.egotaivas.com 5.2.1-RELEASE-p4 FreeBSD 5.2.1-RELEASE-p4 #1: Wed Mar 31 21:45:56 EEST 2004
>Description:
PHP 4.3.5 has cURL extension broken for cURL version >= 7.11.1 (ftp/curl
upgraded to 7.11.1)
See: http://bugs.php.net/27663

Port maintainer (ale at FreeBSD.org) is cc'd.
>How-To-Repeat:
>Fix:

--- php4-4.3.5_7.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/lang/php4/files/patch-ext::curl::curl.c /home/toni/ports/php4/files/patch-ext::curl::curl.c
--- /usr/ports/lang/php4/files/patch-ext::curl::curl.c	Thu Jan  1 02:00:00 1970
+++ /home/toni/ports/php4/files/patch-ext::curl::curl.c	Sun Apr 11 03:29:48 2004
@@ -0,0 +1,76 @@
+--- ext/curl.c.orig	Fri Mar 12 19:43:17 2004
++++ ext/curl/curl.c	Fri Mar 26 21:04:17 2004
+@@ -16,7 +16,7 @@
+    +----------------------------------------------------------------------+
+ */
+ 
+-/* $Id: curl.c,v 1.124.2.18 2004/03/12 17:43:17 iliaa Exp $ */
++/* $Id: curl.c,v 1.124.2.19 2004/03/26 19:04:17 iliaa Exp $ */
+ 
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+@@ -37,6 +37,11 @@
+ #include <curl/curl.h>
+ #include <curl/easy.h>
+ 
++/* As of curl 7.11.1 this is no longer defined inside curl.h */
++#ifndef HttpPost
++#define HttpPost curl_httppost
++#endif
++
+ #define SMART_STR_PREALLOC 4096
+ 
+ #include "ext/standard/php_smart_str.h"
+@@ -133,7 +138,9 @@
+ 	REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_PUT);
++#if CURLOPT_MUTE != 0
+ 	REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
++#endif
+ 	REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_RANGE);
+@@ -506,6 +513,7 @@
+ }
+ /* }}} */
+ 
++#if CURLOPT_PASSWDFUNCTION != 0
+ /* {{{ curl_passwd
+  */
+ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
+@@ -552,6 +560,7 @@
+ 	return ret;
+ }
+ /* }}} */
++#endif
+ 
+ /* {{{ curl_free_string
+  */
+@@ -697,7 +706,9 @@
+ 		case CURLOPT_NETRC:
+ 		case CURLOPT_FOLLOWLOCATION:
+ 		case CURLOPT_PUT:
+-		case CURLOPT_MUTE:
++#if CURLOPT_MUTE != 0
++		 case CURLOPT_MUTE:
++#endif
+ 		case CURLOPT_TIMEOUT:
+ 		case CURLOPT_FTP_USE_EPSV:
+ 		case CURLOPT_LOW_SPEED_LIMIT:
+@@ -842,6 +853,7 @@
+ 			ch->handlers->write_header->func   = *zvalue;
+ 			ch->handlers->write_header->method = PHP_CURL_USER;
+ 			break;
++#if CURLOPT_PASSWDFUNCTION != 0
+ 		case CURLOPT_PASSWDFUNCTION:
+ 			if (ch->handlers->passwd) {
+ 				zval_ptr_dtor(&ch->handlers->passwd);
+@@ -851,6 +863,7 @@
+ 			error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd);
+ 			error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA,     (void *) ch);
+ 			break;
++#endif
+ 		case CURLOPT_POSTFIELDS:
+ 			if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) {
+ 				zval            **current;
--- php4-4.3.5_7.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list