From a367f0eb462c7b1cd01bf9df36f9935bbd39ffd7 Mon Sep 17 00:00:00 2001 From: Torsten Zuehlsdorff Date: Thu, 9 Jan 2020 22:03:40 +0000 Subject: [PATCH] Unbreak databases/php73-mysqli when lang/php73 is build with MYSQLND=off MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently when building lang/php73 with MYSQLND=off, its im possible to build databases/php73-mysqli. When the option MYSQLND was added, we expected users to not use mysqli at all after disabling this option. This has proven to be wrong, so we patch the build to be work again. patch-ext_mysqli_mysqli__api.c was submitted by Сергей . Merge patches from r522478 into this commit and add two additional patches. --- lang/php73/files/patch-ext_mysqli_mysqli__api.c | 13 +++++++++++++ lang/php73/files/patch-ext_mysqli_mysqli__nonapi.c | 12 ++++++++++++ lang/php73/files/patch-ext_mysqli_mysqli__prop.c | 12 ++++++++++++ .../files/patch-ext_mysqli_php__mysqli__structs.h | 11 +++++++++++ 4 files changed, 48 insertions(+) create mode 100644 lang/php73/files/patch-ext_mysqli_mysqli__api.c create mode 100644 lang/php73/files/patch-ext_mysqli_mysqli__nonapi.c create mode 100644 lang/php73/files/patch-ext_mysqli_mysqli__prop.c create mode 100644 lang/php73/files/patch-ext_mysqli_php__mysqli__structs.h diff --git a/lang/php73/files/patch-ext_mysqli_mysqli__api.c b/lang/php73/files/patch-ext_mysqli_mysqli__api.c new file mode 100644 index 000000000000..f97d9f40b1c8 --- /dev/null +++ b/lang/php73/files/patch-ext_mysqli_mysqli__api.c @@ -0,0 +1,13 @@ +--- ext/mysqli/mysqli_api.c.orig 2019-12-17 10:29:23 UTC ++++ ext/mysqli/mysqli_api.c +@@ -31,8 +31,9 @@ + #include "zend_smart_str.h" + #include "php_mysqli_structs.h" + #include "mysqli_priv.h" ++#if defined(MYSQLI_USE_MYSQLND) + #include "ext/mysqlnd/mysql_float_to_double.h" +- ++#endif + + #if !defined(MYSQLI_USE_MYSQLND) + /* {{{ mysqli_tx_cor_options_to_string */ diff --git a/lang/php73/files/patch-ext_mysqli_mysqli__nonapi.c b/lang/php73/files/patch-ext_mysqli_mysqli__nonapi.c new file mode 100644 index 000000000000..9baa04218bf9 --- /dev/null +++ b/lang/php73/files/patch-ext_mysqli_mysqli__nonapi.c @@ -0,0 +1,12 @@ +--- ext/mysqli/mysqli_nonapi.c.orig 2020-01-09 11:40:57 UTC ++++ ext/mysqli/mysqli_nonapi.c +@@ -28,7 +28,9 @@ + #include "php_ini.h" + #include "ext/standard/info.h" + #include "zend_smart_str.h" ++#if defined(MYSQLI_USE_MYSQLND) + #include "php_mysqli_structs.h" ++#endif + #include "mysqli_priv.h" + + #define SAFE_STR(a) ((a)?a:"") diff --git a/lang/php73/files/patch-ext_mysqli_mysqli__prop.c b/lang/php73/files/patch-ext_mysqli_mysqli__prop.c new file mode 100644 index 000000000000..37d47a304440 --- /dev/null +++ b/lang/php73/files/patch-ext_mysqli_mysqli__prop.c @@ -0,0 +1,12 @@ +--- ext/mysqli/mysqli_prop.c.orig 2020-01-09 11:40:11 UTC ++++ ext/mysqli/mysqli_prop.c +@@ -26,7 +26,9 @@ + #include "php.h" + #include "php_ini.h" + #include "ext/standard/info.h" ++#if defined(MYSQLI_USE_MYSQLND) + #include "php_mysqli_structs.h" ++#endif + #include "mysqli_priv.h" + + #define CHECK_STATUS(value) \ diff --git a/lang/php73/files/patch-ext_mysqli_php__mysqli__structs.h b/lang/php73/files/patch-ext_mysqli_php__mysqli__structs.h new file mode 100644 index 000000000000..f0e33efd03aa --- /dev/null +++ b/lang/php73/files/patch-ext_mysqli_php__mysqli__structs.h @@ -0,0 +1,11 @@ +--- ext/mysqli/php_mysqli_structs.h.orig 2019-12-17 10:29:23 UTC ++++ ext/mysqli/php_mysqli_structs.h +@@ -36,7 +36,7 @@ + #define FALSE 0 + #endif + +-#ifdef MYSQLI_USE_MYSQLND ++#if defined(MYSQLI_USE_MYSQLND) + #include "ext/mysqlnd/mysqlnd.h" + #include "mysqli_mysqlnd.h" + #else