summaryrefslogtreecommitdiffstats
path: root/pecl_http-upstream.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-09-25 10:32:38 +0200
committerRemi Collet <fedora@famillecollet.com>2014-09-25 10:32:38 +0200
commitc6fc3750bdef45a30dbb9ab69ff992d5022b422d (patch)
treecd84b4b0ee6a76387f940a85d77f286fd8d59f64 /pecl_http-upstream.patch
parent5eb411f9a063f47b5b700d27b2ad4460e3e76b37 (diff)
php-pecl-http: 2.1.2 (stable)
Diffstat (limited to 'pecl_http-upstream.patch')
-rw-r--r--pecl_http-upstream.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/pecl_http-upstream.patch b/pecl_http-upstream.patch
new file mode 100644
index 0000000..505f524
--- /dev/null
+++ b/pecl_http-upstream.patch
@@ -0,0 +1,34 @@
+From 62030d589336fc052eab8cf4503ef1968f5d9ac8 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Thu, 25 Sep 2014 10:16:51 +0200
+Subject: [PATCH] Fix build with curl < 7.26
+
+$ grep "define CURL_REDIR_POST_30" curl-7.2*/include/curl/curl.h
+
+curl-7.25.0/include/curl/curl.h:#define CURL_REDIR_POST_301 1
+curl-7.25.0/include/curl/curl.h:#define CURL_REDIR_POST_302 2
+
+curl-7.26.0/include/curl/curl.h:#define CURL_REDIR_POST_301 1
+curl-7.26.0/include/curl/curl.h:#define CURL_REDIR_POST_302 2
+curl-7.26.0/include/curl/curl.h:#define CURL_REDIR_POST_303 4
+---
+ php_http_client_curl.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/php_http_client_curl.c b/php_http_client_curl.c
+index 6f9884e..8f25211 100644
+--- a/php_http_client_curl.c
++++ b/php_http_client_curl.c
+@@ -2169,7 +2169,9 @@ PHP_MINIT_FUNCTION(http_client_curl)
+ #if PHP_HTTP_CURL_VERSION(7,19,1)
+ REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "POSTREDIR_301", CURL_REDIR_POST_301, CONST_CS|CONST_PERSISTENT);
+ REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "POSTREDIR_302", CURL_REDIR_POST_302, CONST_CS|CONST_PERSISTENT);
++#if PHP_HTTP_CURL_VERSION(7,26,0)
+ REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "POSTREDIR_303", CURL_REDIR_POST_303, CONST_CS|CONST_PERSISTENT);
++#endif
+ REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "POSTREDIR_ALL", CURL_REDIR_POST_ALL, CONST_CS|CONST_PERSISTENT);
+ #endif
+
+--
+2.1.0
+