GCC 15 trunk now defaults to C23, where bool is a keyword
...so the existing C code started to fail with > In file included from workdir/UnpackedTarball/mariadb-connector-c/libmariadb/ma_alloc.c:20: > workdir/UnpackedTarball/mariadb-connector-c/include/ma_global.h:687:25: error: two or more data types in declaration specifiers > 687 | typedef char bool; /* Ordinary boolean values 0 1 */ > | ^~~~ (And the !defined(HAVE_BOOL) there, always being true, apparently started to get in the way now and thus needed to be removed, whatever its original purpose.) Change-Id: I781458d643e01a7199e19a178da3a32520d16b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177260 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
This commit is contained in:
parent
e2378e0074
commit
ac2b3c339e
2 changed files with 12 additions and 0 deletions
|
@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,mariadb-connector-c,1))
|
|||
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,mariadb-connector-c,\
|
||||
external/mariadb-connector-c/clang-cl.patch.0 \
|
||||
external/mariadb-connector-c/c23.patch.0 \
|
||||
))
|
||||
|
||||
# TODO are any "plugins" needed?
|
||||
|
|
11
external/mariadb-connector-c/c23.patch.0
vendored
Normal file
11
external/mariadb-connector-c/c23.patch.0
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- include/ma_global.h
|
||||
+++ include/ma_global.h
|
||||
@@ -683,7 +683,7 @@
|
||||
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(__cplusplus) || __STDC_VERSION__ >= 202311L)
|
||||
typedef char bool; /* Ordinary boolean values 0 1 */
|
||||
#endif
|
||||
/* Macros for converting *constants* to the right type */
|
Loading…
Reference in a new issue