[posix] fix build with custom netif prefix route set (#10431)

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.
```
This commit is contained in:
Stefan Agner
2024-06-24 09:05:53 -04:00
committed by GitHub
parent ea25f0954b
commit 9232ead562
+1 -1
View File
@@ -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)
{