Unbreak databases/php73-mysqli when lang/php73 is build with MYSQLND=off

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 Сергей <joker@pinnet.ru>.

Merge patches from r522478 into this commit and add two additional patches.
This commit is contained in:
Torsten Zuehlsdorff 2020-01-09 22:03:40 +00:00
parent c2dfb89a40
commit a367f0eb46
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=522539
4 changed files with 48 additions and 0 deletions

View file

@ -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 */

View file

@ -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:"")

View file

@ -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) \

View file

@ -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