If compiling using a C++ compiler, `_Bool` is undefined, as it is a C
built-in type and C++ compilers do not recognize it. Define `__bool`,
`__true` and `__false` for C++ compiler as `bool`, `true` and `false`.
Checkpatch-Ignore: REPEATED_WORD
Github-Fixes: #1513
Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Maria Pana <maria.pana4@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
GitHub-Closes: #1500
__u32 counter;
} __atomic;
+#ifdef __cplusplus
+typedef bool __bool;
+#define __true (true)
+#define __false (false)
+#else
typedef _Bool __bool;
#define __true (1)
#define __false (0)
+#endif /* __cplusplus */
#else /* __ASSEMBLY__ */