Skip to contentSkip to conversation

cyclictest: Fix BUILD failure for GCC_VER < 15

PATCH In review Suneeth D 2 participants 2 messages Sep 11

lore
Share & tools
lore

Suneeth D

author
#0 lore raw

PATCH v3 1/1 cyclictest: Fix BUILD failure for GCC_VER < 15

timerthread() uses bool, true, and false. Those are keywords in C23, which became GCC's default in GCC 15 (-std=gnu23), so the file compiles there without stdbool.h. With GCC 14 and earlier the default is gnu17, where they are provided by <stdbool.h>, and the build fails without it.

Fixes 98fcd661ac59 (cyclictest: Acquire a lock before invoking pthread_cond_signal())

---

Please ignore the previously sent v2. Sorry for the noise.

Changes since v2 ---> v3:

* Add Signed-off tag by John Kacur

Changes since v1 ---> v2:

* Modify commit message to include Tomas Glozar's note on default changes happened since GCC 15.

based on: fd45df830803dd7f26d2ca8bdcf05fd7e0d62ae8 (rt-tests/main)

 src/cyclictest/cyclictest.c | 1 +
 1 file changed, 1 insertion(+)
src/cyclictest/cyclictest.c +1 -0
index 99194378f946..58b56bcede0f 100644
@@ -15,6 +15,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <stdarg.h>
+#include <stdbool.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <getopt.h>
Signature · 1 line
2.43.0
#1 lore raw
Quoted 10 lines · Suneeth D

timerthread() uses bool, true, and false. Those are keywords in C23, which became GCC's default in GCC 15 (-std=gnu23), so the file compiles there without stdbool.h. With GCC 14 and earlier the default is gnu17, where they are provided by <stdbool.h>, and the build fails without it.

Fixes 98fcd661ac59 (cyclictest: Acquire a lock before invoking pthread_cond_signal())
Quoted 8 lines

---

Please ignore the previously sent v2. Sorry for the noise.

Changes since v2 ---> v3:

* Add Signed-off tag by John Kacur

You don't need to create a third patch version just to include my sign-off. That's just my acknowledgement that I've accepted the patch into my repo

Cheers

John Kacur