From 9232ead5625f5534fafac6be5edc245e4ffd13b8 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 24 Jun 2024 15:05:53 +0200 Subject: [PATCH] [posix] fix build with custom netif prefix route set (#10431) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a build error when the pre-processor define OPENTHREAD_POSIX_CONFIG_NETIF_PREFIX_ROUTE_METRIC is set: ``` /usr/src/ot-br-posix/third_party/openthread/repo/src/posix/platform/netif.cpp:486:26: error: ‘kLinkLocalScope’ does not name a type 486 | static constexpr kLinkLocalScope = 2; | ^~~~~~~~~~~~~~~ compilation terminated due to -Wfatal-errors. ``` --- src/posix/platform/netif.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix/platform/netif.cpp b/src/posix/platform/netif.cpp index ebb0e79a1..12bee4256 100644 --- a/src/posix/platform/netif.cpp +++ b/src/posix/platform/netif.cpp @@ -483,7 +483,7 @@ static void UpdateUnicastLinux(otInstance *aInstance, const otIp6AddressInfo &aA #endif { #if OPENTHREAD_POSIX_CONFIG_NETIF_PREFIX_ROUTE_METRIC > 0 - static constexpr kLinkLocalScope = 2; + static constexpr uint8_t kLinkLocalScope = 2; if (aAddressInfo.mScope > kLinkLocalScope) {