Description: Fix FTBFS with MariaDB 11.8 headers
 Guard the MySQL-8 my_bool typedef with MARIADB_BASE_VERSION so it is
 skipped when building against MariaDB (whose mysql.h already defines
 typedef char my_bool), and drop the superfluous argument from the two
 load_configuration() call sites to match the no-argument declaration.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: no
Last-Update: 2026-09-03
---

--- lyricue-4.0.13.isreally.4.0.12.orig/src/database.h
+++ lyricue-4.0.13.isreally.4.0.12/src/database.h
@@ -18,7 +18,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <mysql.h>
+/* MariaDB headers still provide their own typedef char my_bool,
+ * so only define the MySQL 8 compatible type when it is missing. */
+#ifndef MARIADB_BASE_VERSION
 typedef bool my_bool;
+#endif
 
 int db_select ();
 int db_deselect ();
--- lyricue-4.0.13.isreally.4.0.12.orig/src/lyricue_display.c
+++ lyricue-4.0.13.isreally.4.0.12/src/lyricue_display.c
@@ -182,7 +182,7 @@ main (int argc, char *argv[])
         }
         do_query(FALSE, lyricDb, "INSERT INTO profiles (host, profile) VALUES ('%s', '%s')", hostname, profile);
     }
-    load_configuration (lyricDb);
+    load_configuration ();
     bible_load ((gchar *) g_hash_table_lookup (config, "DefBible"));
 
 
@@ -528,7 +528,7 @@ void
 do_reconfig ()
 {
     l_debug ("do_reconfig");
-    load_configuration (lyricDb);
+    load_configuration ();
 }
 
 void
