mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-03-31 11:22:38 +02:00
Fix bool typedef error.
```
In file included from mtxl.c:29:
mtx.h:225:16: error: cannot use keyword 'false' as enumeration constant
225 | typedef enum { false, true } boolean;
| ^~~~~
mtx.h:225:16: note: 'false' is a keyword with '-std=c23' onwards
```
27 lines
511 B
Diff
27 lines
511 B
Diff
diff -ruN a/mtx.h b/mtx.h
|
|
--- a/mtx.h 2008-08-19 10:03:43.000000000 +0000
|
|
+++ b/mtx.h 2025-07-31 00:04:37.180000000 +0000
|
|
@@ -56,6 +56,10 @@
|
|
# include <stdarg.h>
|
|
#endif
|
|
|
|
+#if HAVE_STDBOOL_H
|
|
+# include <stdbool.h>
|
|
+#endif
|
|
+
|
|
#if HAVE_SYS_STAT_H
|
|
# include <sys/stat.h>
|
|
#endif
|
|
@@ -222,7 +226,11 @@
|
|
#define Input 0
|
|
#define Output 1
|
|
#else
|
|
+#if __STDC_VERSION__ < 202311L
|
|
typedef enum { false, true } boolean;
|
|
+#else
|
|
+typedef bool boolean;
|
|
+#endif
|
|
|
|
typedef enum { Input, Output } Direction_T;
|
|
#endif
|