Description: Guard my_bool typedef redefinition so it only applies to
 MySQL 8.0+ (which removed my_bool from its headers), avoiding a
 "conflicting types for my_bool" build failure with MariaDB
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Forwarded: not-needed
Last-Update: 2026-09-05

--- pvpgn-1.8.5.orig/src/bnetd/sql_mysql.c
+++ pvpgn-1.8.5/src/bnetd/sql_mysql.c
@@ -24,7 +24,12 @@
 #else
 #include <mysql.h>
 #endif
+/* MySQL 8.0 removed the my_bool typedef from its headers, while MariaDB
+ * (and MySQL < 8.0) still provide "typedef char my_bool;".  Only
+ * re-introduce the alias when the header did not already define it. */
+#if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 80000 && !defined(MARIADB_VERSION_ID)
 typedef bool my_bool;
+#endif
 #include <stdlib.h>
 #include "common/eventlog.h"
 #include "common/xalloc.h"

