-
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.
dev-libs/redland-1.0.17-r2: Fix build with dev-db/mysql-connector-c-8…
….0.18 Closes: https://bugs.gentoo.org/692462 See-Also: dajobe/librdf#14
- Loading branch information
1 parent
299b20e
commit 7266d12
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
dev-libs/redland-1.0.17-r2/redland-1.0.17-fix-mysql-connector-c-8.0-compat.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,41 @@ | ||
From 0b75221f7c5a9dddc1381968227456213951d46e Mon Sep 17 00:00:00 2001 | ||
From: Dennis Schridde <[email protected]> | ||
Date: Sat, 19 Oct 2019 22:09:14 +0200 | ||
Subject: [PATCH] Fix build with mysql-connector-c v8.0.18 | ||
|
||
This fixes following compilation failure with version 8.0.18 of | ||
mysql-connector-c: | ||
``` | ||
rdf_storage_mysql.c: In function 'librdf_storage_mysql_get_handle': | ||
rdf_storage_mysql.c:450:5: error: unknown type name 'my_bool'; did you mean 'bool'? | ||
450 | my_bool value=(context->reconnect) ? 1 : 0; | ||
| ^~~~~~~ | ||
| bool | ||
make[3]: *** [Makefile:886: librdf_storage_mysql_la-rdf_storage_mysql.lo] Error 1 | ||
``` | ||
|
||
The correct type for calling `mysql_options` with `MYSQL_OPT_RECONNECT` | ||
in version 8.0 of the library is `bool*`: | ||
https://dev.mysql.com/doc/refman/8.0/en/mysql-options.html | ||
|
||
See-Also: https://bugs.gentoo.org/692462 | ||
--- | ||
src/rdf_storage_mysql.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/rdf_storage_mysql.c b/src/rdf_storage_mysql.c | ||
index ca9a4eef..fbaa4dba 100644 | ||
--- a/src/rdf_storage_mysql.c | ||
+++ b/src/rdf_storage_mysql.c | ||
@@ -447,7 +447,7 @@ librdf_storage_mysql_get_handle(librdf_storage* storage) | ||
|
||
#ifdef HAVE_MYSQL_OPT_RECONNECT | ||
if(1) { | ||
- my_bool value=(context->reconnect) ? 1 : 0; | ||
+ bool value=(context->reconnect) ? 1 : 0; | ||
mysql_options(connection->handle, MYSQL_OPT_RECONNECT, &value); | ||
} | ||
#endif | ||
-- | ||
2.23.0 | ||
|