'true' and 'false' are keywords in C23. This will equally be an issue on
older standards if something pulls in stdbool.h, which make these into
macros. In either of these two cases, just typedef 'boolean' from
'bool' (avoiding the enum), and rely on 'true' and 'false' being valid
values of the type.

Signed-off-by: Sergey Bugaev <buga...@gmail.com>
---

Only compile-tested.

 linux/src/drivers/scsi/BusLogic.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/linux/src/drivers/scsi/BusLogic.h 
b/linux/src/drivers/scsi/BusLogic.h
index f60ee071..7b2644a6 100644
--- a/linux/src/drivers/scsi/BusLogic.h
+++ b/linux/src/drivers/scsi/BusLogic.h
@@ -311,8 +311,11 @@ BusLogic_BIOS_DiskGeometryTranslation_T;
 /*
   Define a Boolean data type.
 */
-
+#if defined(__bool_true_false_are_defined) || __STDC_VERSION__ > 201710L
+typedef bool boolean;
+#else
 typedef enum { false, true } __attribute__ ((packed)) boolean;
+#endif
 
 
 /*
-- 
2.47.1


Reply via email to