You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
C23-incompatible bool definition and CMake build #1588
The build system used to explicitly set the C standard to C90 with set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90") - this was removed in the #1586 changes. This causes build failure with a compiler like GCC 15 that defaults to C23, because several of the source files have non-C23-compatible definitions of bool.
There are two ways to fix this: either specify the C standard explicitly in CMake (it's simpler to do this by setting CMAKE_C_STANDARD), or fix the code to be compatible with newer versions of C (you could require C99 rather than C90 and use stdbool.h, for example).
What are the steps to reproduce this?
Build using CMake's defaults on a machine with GCC 15.
Can you provide any logs? (output, errors, etc.)
You get an error like this for each of the files that has a typedef for bool:
/src/radio/hackrf/work/ab605692553a9e59dd74222f98fa1dda86a5e44e/host/hackrf-tools/src/hackrf_operacake.c:31:13: error: ‘bool’ cannot be defined via ‘typedef’
31 | typedef int bool;
| ^~~~
/src/radio/hackrf/work/ab605692553a9e59dd74222f98fa1dda86a5e44e/host/hackrf-tools/src/hackrf_operacake.c:31:13: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
/src/radio/hackrf/work/ab605692553a9e59dd74222f98fa1dda86a5e44e/host/hackrf-tools/src/hackrf_operacake.c:31:1: warning: useless type name in empty declaration
31 | typedef int bool;
| ^~~~~~~
Activity
mossmann commentedon Oct 2, 2025
Thank you for the detailed report!