From 3c65092344102c5119bb0670f419be00253ac292 Mon Sep 17 00:00:00 2001 From: Kangping Date: Thu, 16 Feb 2023 05:20:59 +0800 Subject: [PATCH] [tests] add build tests for BR features (#6570) BR features are tested with "Border Router" CI task but it is built with gcc by default. This commit adds BR features to posix build checks which apply clang/clang++. --- script/check-posix-build-cmake | 7 +++++++ src/posix/platform/infra_if.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/script/check-posix-build-cmake b/script/check-posix-build-cmake index 90dc898ce..a8337bdff 100755 --- a/script/check-posix-build-cmake +++ b/script/check-posix-build-cmake @@ -51,6 +51,13 @@ build() "-DOT_TREL=ON" ) + if [[ $OSTYPE != "darwin"* ]]; then + options+=( + "-DOT_BORDER_ROUTING=ON" + "-DOT_SRP_SERVER=ON" + ) + fi + reset_source "$(dirname "$0")"/cmake-build posix "${options[@]}" } diff --git a/src/posix/platform/infra_if.cpp b/src/posix/platform/infra_if.cpp index 4becc3261..2b37ceff3 100644 --- a/src/posix/platform/infra_if.cpp +++ b/src/posix/platform/infra_if.cpp @@ -295,7 +295,7 @@ uint32_t InfraNetif::GetFlags(void) const close(sock); - return ifReq.ifr_flags; + return static_cast(ifReq.ifr_flags); } void InfraNetif::CountAddresses(otSysInfraNetIfAddressCounters &aAddressCounters) const