Description: Avoid conflicting my_bool typedef with MariaDB client headers
 mysql8_my_bool.patch reintroduces `typedef bool my_bool` for MySQL >= 8.0,
 whose client headers removed the type.  MariaDB (and MySQL < 8.0) headers
 already declare `typedef char my_bool`, so the unconditional typedef causes
 a conflicting declaration compile error.  Only add the typedef when the
 included client headers do not provide it.
Author: openKylinBot <openKylinBot@openkylin.top>
Origin: vendor
Forwarded: no
Last-Update: 2026-09-14
---
--- voms-mysql-plugin-3.1.7.orig/src/mysqlwrap.cc
+++ voms-mysql-plugin-3.1.7/src/mysqlwrap.cc
@@ -26,7 +26,12 @@
 
 #include "mysqlwrap.h"
 #include <mysql/mysql.h>
+#if defined(MARIADB_BASE_VERSION) || (defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID < 80000)
+/* MySQL < 8.0 and MariaDB headers already provide a my_bool typedef (char). */
+#else
+/* MySQL >= 8.0 removed the my_bool typedef from the client headers. */
 typedef bool my_bool;
+#endif
 #include <mysql/errmsg.h>
 #include <string>
 #include <algorithm>
