From b10b76e5a2b983d86bd487873608abce8e0d507b Mon Sep 17 00:00:00 2001
From: Michal Schorm <mschorm@redhat.com>
Date: Wed, 12 Feb 2025 15:17:39 +0100
Subject: [PATCH] Fix compilation with GCC 15
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

| In file included from /builddir/build/BUILD/mariadb-connector-c-3.4.3-build/mariadb-connector-c-3.4.3-src/plugins/auth/dialog.c:23:
| /builddir/build/BUILD/mariadb-connector-c-3.4.3-build/mariadb-connector-c-3.4.3-src/include/ma_global.h:687:25: error: ‘bool’ cannot be defined via ‘typedef’
|   687 | typedef char            bool;   /* Ordinary boolean values 0 1 */
|       |                         ^~~~
| /builddir/build/BUILD/mariadb-connector-c-3.4.3-build/mariadb-connector-c-3.4.3-src/include/ma_global.h:687:25: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
---
 include/ma_global.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/ma_global.h
+++ b/include/ma_global.h
@@ -683,7 +683,7 @@ typedef unsigned long	size_s; /* Size of
 typedef int		myf;	/* Type of MyFlags in my_funcs */
 typedef char		my_bool; /* Small bool */
 typedef unsigned long long my_ulonglong;
-#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
+#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) && (__STDC_VERSION__ < 202300L)
 typedef char		bool;	/* Ordinary boolean values 0 1 */
 #endif
 	/* Macros for converting *constants* to the right type */
