From 9db16997af063e42e10b553f1c598b6261a73dbf Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Wed, 18 Sep 2019 08:53:46 +0200 Subject: [PATCH] [liba] Update the bool type to use _Bool _Bool is defined in C99 which we use already. In practice it's 1 byte just like char, so this shouldn't have any impact on the built object. But this patch removes LTO errors when linking C code with C++ code. Indeed, the linker would raise type mismatch because in C++ bool is defined to _Bool whereas in C it would be defined to char. --- liba/include/stdbool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liba/include/stdbool.h b/liba/include/stdbool.h index 07505e9e3..36383c68f 100644 --- a/liba/include/stdbool.h +++ b/liba/include/stdbool.h @@ -3,7 +3,7 @@ #ifndef __cplusplus -typedef char bool; +typedef _Bool bool; #define true 1 #define false 0