forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-office/libreoffice: Fix build with >=dev-db/mysql-connector-c-8
Thanks-to: Peter Levine <[email protected]> Closes: https://bugs.gentoo.org/692422 Package-Manager: Portage-2.3.77, Repoman-2.3.17 Signed-off-by: Andreas Sturmlechner <[email protected]>
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
app-office/libreoffice/files/libreoffice-6.3.2.2-mysql-connector-c-8.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From 5917ba8bc645a2b105ec089101b8a664481b5b61 Mon Sep 17 00:00:00 2001 | ||
From: Peter Levine <[email protected]> | ||
Date: Thu, 17 Oct 2019 23:08:57 -0400 | ||
Subject: Fix building against MySQL Connector/C 8 | ||
|
||
In MySQL Connector/C 8, my_bool is replaced by bool. It was | ||
previously defined as char. When building against | ||
MySQL Connector/C 8, this leads to type punning build errors. | ||
Redefine affected members of struct BindMetaData as bool if using | ||
version 8 of greater. Otherwise, default to char. | ||
|
||
Change-Id: If12b975d95afae86502867cb334cb4195802f91d | ||
Reviewed-on: https://gerrit.libreoffice.org/81002 | ||
Reviewed-by: Samuel Mehrbrodt <[email protected]> | ||
Tested-by: Samuel Mehrbrodt <[email protected]> | ||
--- | ||
.../source/drivers/mysqlc/mysqlc_preparedstatement.hxx | 10 ++++++++-- | ||
1 file changed, 8 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.hxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.hxx | ||
index 1df2c70..3450473 100644 | ||
--- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.hxx | ||
+++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.hxx | ||
@@ -39,11 +39,17 @@ using ::com::sun::star::uno::Reference; | ||
using ::com::sun::star::uno::RuntimeException; | ||
using ::com::sun::star::uno::Type; | ||
|
||
+#if defined MYSQL_VERSION_ID && (MYSQL_VERSION_ID >= 80000) | ||
+using my_bool = bool; | ||
+#else | ||
+using my_bool = char; | ||
+#endif | ||
+ | ||
struct BindMetaData | ||
{ | ||
- char is_null = 0; | ||
+ my_bool is_null = 0; | ||
unsigned long length = 0; | ||
- char error = 0; | ||
+ my_bool error = 0; | ||
}; | ||
|
||
typedef ::cppu::ImplHelper5<css::sdbc::XPreparedStatement, css::sdbc::XParameters, | ||
-- | ||
cgit v1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters