|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Rafal Miecznik <rafal.miecznik@nordicsemi.no> |
| 3 | +Date: Mon, 1 Jun 2026 14:30:00 +0200 |
| 4 | +Subject: [PATCH] [nrf toup][nrfconnect] Use net_in6_addr for Zephyr 4.x |
| 5 | + |
| 6 | +Zephyr 4.x (NCS v3.3) renamed struct in6_addr to struct net_in6_addr. |
| 7 | +Update InetUtils to match sdk-connectedhomeip v3.3.0 so v3.2-door-lock-app |
| 8 | +Matter builds against NCS v3.3. |
| 9 | + |
| 10 | +Signed-off-by: Rafal Miecznik <rafal.miecznik@nordicsemi.no> |
| 11 | +--- |
| 12 | + src/platform/Zephyr/InetUtils.cpp | 4 ++-- |
| 13 | + src/platform/Zephyr/InetUtils.h | 4 ++-- |
| 14 | + 2 files changed, 4 insertions(+), 4 deletions(-) |
| 15 | + |
| 16 | +diff --git a/src/platform/Zephyr/InetUtils.cpp b/src/platform/Zephyr/InetUtils.cpp |
| 17 | +index 032290ec..a4816994 100644 |
| 18 | +--- a/src/platform/Zephyr/InetUtils.cpp |
| 19 | ++++ b/src/platform/Zephyr/InetUtils.cpp |
| 20 | +@@ -25,9 +25,9 @@ namespace chip { |
| 21 | + namespace DeviceLayer { |
| 22 | + namespace InetUtils { |
| 23 | + |
| 24 | +-in6_addr ToZephyrAddr(const Inet::IPAddress & address) |
| 25 | ++net_in6_addr ToZephyrAddr(const Inet::IPAddress & address) |
| 26 | + { |
| 27 | +- in6_addr zephyrAddr; |
| 28 | ++ net_in6_addr zephyrAddr; |
| 29 | + |
| 30 | + static_assert(sizeof(zephyrAddr.s6_addr) == sizeof(address.Addr), "Unexpected address size"); |
| 31 | + memcpy(zephyrAddr.s6_addr, address.Addr, sizeof(address.Addr)); |
| 32 | +diff --git a/src/platform/Zephyr/InetUtils.h b/src/platform/Zephyr/InetUtils.h |
| 33 | +index 0ba3da65..f78d6311 100644 |
| 34 | +--- a/src/platform/Zephyr/InetUtils.h |
| 35 | ++++ b/src/platform/Zephyr/InetUtils.h |
| 36 | +@@ -17,14 +17,14 @@ |
| 37 | + |
| 38 | + #include <inet/InetInterface.h> |
| 39 | + |
| 40 | +-struct in6_addr; |
| 41 | ++struct net_in6_addr; |
| 42 | + struct net_if; |
| 43 | + |
| 44 | + namespace chip { |
| 45 | + namespace DeviceLayer { |
| 46 | + namespace InetUtils { |
| 47 | + |
| 48 | +-in6_addr ToZephyrAddr(const Inet::IPAddress & address); |
| 49 | ++net_in6_addr ToZephyrAddr(const Inet::IPAddress & address); |
| 50 | + net_if * GetInterface(Inet::InterfaceId ifaceId = Inet::InterfaceId::Null()); |
| 51 | + net_if * GetWiFiInterface(); |
| 52 | + |
| 53 | +-- |
| 54 | +2.52.0 |
0 commit comments