Commit 0e657f8
committed
Fix compilation with C23
GCC 15 has been released (fairly) recently, and with it come C23
features such as built-in `bool` types, which obviate the need for
defining these in each code-base.
In our case, this also causes compilation errors with GCC 15 (unless the
`-std=gnu17` flag is passed), e.g.:
./test.go:16:17: error: two or more data types in declaration specifiers
16 | typedef uint8_t bool;
| ^~~~
This commit wraps these `typedef` declarations in `__STDC_VERSION__`
checks, skipping if the version is C23 or over.1 parent 04cb87b commit 0e657f8
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
410 | 412 | | |
411 | 413 | | |
412 | 414 | | |
413 | | - | |
| 415 | + | |
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
0 commit comments