From 9b67c47ae20ce025c5c5329732b7f8f4cb99c6f4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 10 Nov 2026 06:10:48 -0800 Subject: [PATCH] ot-br-posix: Do not error on sign-compare with musl and clang musl's CMSG_NXTHDR compares a size_t with a ptrdiff_t, which clang reports under -Wextra when the macro is expanded in openthread's posix platform code, and -Werror turns it into: infra_if.cpp:275:31: fatal error: comparison of integers of different signs: '__size_t' (aka 'unsigned long') and '__ptrdiff_t' (aka 'long') [-Wsign-compare] This used to be handled by meta-clang's nonclangable.conf. Do the same as oe-core's seatd recipe. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- .../recipes-connectivity/openthread/ot-br-posix_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb b/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb index 59e1dae2a3..5006b253fe 100644 --- a/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb +++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb @@ -27,6 +27,8 @@ inherit pkgconfig cmake systemd # Use -std=c++20 for fixing # recipe-sysroot/usr/include/c++/15.1.0/ciso646:46:4: error: #warning " is deprecated in C++17, use to detect implementation-specific macros" [-Werror=cpp] CXXFLAGS += "-std=c++20 -Wno-error=attributes" +# musl CMSG_NXTHDR mixes size_t and ptrdiff_t +CXXFLAGS:append:libc-musl:toolchain-clang = " -Wno-error=sign-compare" LDFLAGS:append:riscv32 = " -latomic" EXTRA_OECMAKE = "-DBUILD_TESTING=OFF \