Skip to content

Commit

Permalink
dev-libs/redland-1.0.17-r2: Fix build with dev-db/mysql-connector-c-8…
Browse files Browse the repository at this point in the history
  • Loading branch information
devurandom committed Oct 19, 2019
1 parent 299b20e commit 7266d12
Showing 1 changed file with 41 additions and 0 deletions.
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

0 comments on commit 7266d12

Please sign in to comment.