[packages/php-pecl-mysql] Pick mysqlnd length type and handle format by PHP version
arekm
arekm at pld-linux.org
Sat Nov 21 23:23:48 CET 2026
commit 78ccb3546481a992c136062dbbff8074e1865b67
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Nov 21 23:23:16 2026 +0100
Pick mysqlnd length type and handle format by PHP version
build.patch | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/build.patch b/build.patch
index 26a971f..6949c8d 100644
--- a/build.patch
+++ b/build.patch
@@ -1,16 +1,22 @@
--- php73-pecl-mysql-1.0.0-ca514c4/php_mysql.c.org 2026-01-29 21:34:03.582390606 +0100
+++ php73-pecl-mysql-1.0.0-ca514c4/php_mysql.c 2026-01-29 21:34:16.265390923 +0100
-@@ -80,7 +80,13 @@ static int le_result, le_link, le_plink;
+@@ -80,7 +80,19 @@ static int le_result, le_link, le_plink;
#define SAFE_STRING(s) ((s)?(s):"")
- #if MYSQL_VERSION_ID > 32199 || defined(MYSQL_USE_MYSQLND)
-+#if ((defined(__x86_64__) && defined(__ILP32__)) || (PHP_VERSION_ID <= 70000))
++/* zend_resource.handle is int before PHP 8.1, zend_long since */
++#if PHP_VERSION_ID >= 80100
++# define ZEND_M_FMT ZEND_LONG_FMT
++#else
+# define ZEND_M_FMT "%d"
-+# define mysql_row_length_type size_t
++#endif
++
+ #if MYSQL_VERSION_ID > 32199 || defined(MYSQL_USE_MYSQLND)
++/* mysqlnd's fetch_lengths() returns zend_ulong * in PHP 7.0, const size_t * since 7.1 */
++# if defined(MYSQL_USE_MYSQLND) && PHP_VERSION_ID >= 70100
++# define mysql_row_length_type size_t
+# else
-+# define ZEND_M_FMT ZEND_LONG_FMT
# define mysql_row_length_type zend_ulong
-+#endif
++# endif
# define HAVE_MYSQL_ERRNO
#else
# define mysql_row_length_type unsigned int
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-mysql.git/commitdiff/78ccb3546481a992c136062dbbff8074e1865b67
More information about the pld-cvs-commit
mailing list