[packages/php/PHP_5_4] - fix building with mysql 5.7 (ER macro uses unexported array) - rel 19
baggins
baggins at pld-linux.org
Tue Mar 20 21:22:11 CET 2018
commit d863410597cf339a5468816a42c9ad6e74b90d5a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Mar 20 21:21:08 2018 +0100
- fix building with mysql 5.7 (ER macro uses unexported array)
- rel 19
mysqli-err.patch | 29 +++++++++++++++++++++++++++++
php.spec | 4 +++-
2 files changed, 32 insertions(+), 1 deletion(-)
---
diff --git a/php.spec b/php.spec
index f79c8a0..cf5fff1 100644
--- a/php.spec
+++ b/php.spec
@@ -138,7 +138,7 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
%undefine with_filter
%endif
-%define rel 18
+%define rel 19
%define orgname php
%define ver_suffix 54
%define php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -232,6 +232,7 @@ Patch67: mysql-lib-ver-mismatch.patch
Patch68: x32.patch
Patch70: libvpx2.patch
Patch71: zend_operators_from_5.5.patch
+Patch72: mysqli-err.patch
URL: http://www.php.net/
%{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}}
%{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0}
@@ -1974,6 +1975,7 @@ cp -p php.ini-production php.ini
# asm part of zend_operators.h of php-5.5
%patch71 -p1
%endif
+%patch72 -p1
%{__sed} -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
diff --git a/mysqli-err.patch b/mysqli-err.patch
new file mode 100644
index 0000000..99e5eac
--- /dev/null
+++ b/mysqli-err.patch
@@ -0,0 +1,29 @@
+--- php-5.4.45/ext/mysqli/mysqli.c.orig 2018-03-20 20:56:38.000000000 +0100
++++ php-5.4.45/ext/mysqli/mysqli.c 2018-03-20 21:15:42.030265770 +0100
+@@ -1376,7 +1376,7 @@
+ }
+
+ if (!(mysql = (MY_MYSQL *)userdata)) {
+- LOCAL_INFILE_ERROR_MSG(data->error_msg, ER(CR_UNKNOWN_ERROR));
++ LOCAL_INFILE_ERROR_MSG(data->error_msg, "Unknown MySQL error");
+ return 1;
+ }
+
+@@ -1423,7 +1423,7 @@
+ int count = (int)php_stream_read(mysql->li_stream, buf, buf_len);
+
+ if (count < 0) {
+- LOCAL_INFILE_ERROR_MSG(data->error_msg, ER(2));
++ LOCAL_INFILE_ERROR_MSG(data->error_msg, "Can't connect to local MySQL server");
+ }
+
+ return count;
+@@ -1499,7 +1499,7 @@
+ strlcpy(error_msg, data->error_msg, error_msg_len);
+ return 2000;
+ }
+- strlcpy(error_msg, ER(CR_OUT_OF_MEMORY), error_msg_len);
++ strlcpy(error_msg, "MySQL client ran out of memory", error_msg_len);
+ return CR_OUT_OF_MEMORY;
+ }
+ /* }}} */
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/d863410597cf339a5468816a42c9ad6e74b90d5a
More information about the pld-cvs-commit
mailing list