diff --git a/tools/src/airspyhf_rx.c b/tools/src/airspyhf_rx.c
index e633804..6dbb23e 100644
--- a/tools/src/airspyhf_rx.c
+++ b/tools/src/airspyhf_rx.c
@@ -37,12 +37,14 @@
 #include <airspyhf.h>
 
 #if !defined __cplusplus
+#if __STDC_VERSION__ < 202311L
 #ifndef bool
 typedef int bool;
 #define true 1
 #define false 0
 #endif
 #endif
+#endif
 
 #ifdef _WIN32
 #include <windows.h>
