From 37c47ee26519d36e615d36b3a48cbb2de6d2e8f3 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 26 Aug 2026 18:39:54 +0200 Subject: [PATCH] package/olsr: fix build with GCC >= 15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces a patch, submitted upstream, that fixes the build of OLSR with GCC >= 15. Fixes: https://autobuild.buildroot.net/results/650edf74dec513ad540f80f4d3ef8c8222dfd711/ Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain (cherry picked from commit 34473e672b7cb4dabcf6ed36a4cb41ccb1e04641) Signed-off-by: Raphaël Mélotte --- ...es.h-fix-boolean-type-check-with-C23.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/olsr/0007-src-olsr_types.h-fix-boolean-type-check-with-C23.patch diff --git a/package/olsr/0007-src-olsr_types.h-fix-boolean-type-check-with-C23.patch b/package/olsr/0007-src-olsr_types.h-fix-boolean-type-check-with-C23.patch new file mode 100644 index 0000000000..dbb167fe96 --- /dev/null +++ b/package/olsr/0007-src-olsr_types.h-fix-boolean-type-check-with-C23.patch @@ -0,0 +1,35 @@ +From 6d7aab6d01ffa68f79b0b238d812a074051d94c4 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 26 Aug 2026 00:00:00 +0000 +Subject: [PATCH] src/olsr_types.h: fix boolean type check with C23 + +GCC 15 defaults to GNU C23. In C23, bool, true and false are keywords, +and no longer defines __bool_true_false_are_defined. Therefore +the existing preprocessor check incorrectly rejects a valid C23 environment. + +Keep the check for older C standards, where these identifiers must be +provided as macros by or by the GNU C fallback. + +Upstream: https://github.com/OLSR/olsrd/pull/139 +Signed-off-by: Thomas Petazzoni +--- + src/olsr_types.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/olsr_types.h b/src/olsr_types.h +index 36d2b723..ce2a0559 100644 +--- a/src/olsr_types.h ++++ b/src/olsr_types.h +@@ -82,7 +82,8 @@ typedef signed int int32_t; + + /* add some safe-gaurds */ + #ifndef _MSC_VER +-#if !defined bool || !defined true || !defined false || !defined __bool_true_false_are_defined ++#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 202311L) && \ ++ (!defined bool || !defined true || !defined false || !defined __bool_true_false_are_defined) + #error You have no C99-like boolean types. Please extend src/olsr_type.h! + #endif /* !defined bool || !defined true || !defined false || !defined __bool_true_false_are_defined */ + #endif /* _MSC_VER */ +-- +2.55.0 +