Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IPv6-only builds where platform LwIP has IPv4 #10879

Merged
merged 1 commit into from
Oct 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/inet/IPAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ IPAddress::IPAddress(const ip6_addr_t & ipv6Addr)
memcpy(Addr, &ipv6Addr, sizeof(ipv6Addr));
}

#if INET_CONFIG_ENABLE_IPV4
#if INET_CONFIG_ENABLE_IPV4 || LWIP_IPV4

IPAddress::IPAddress(const ip4_addr_t & ipv4Addr)
{
Expand Down Expand Up @@ -106,6 +106,10 @@ IPAddress::IPAddress(const ip_addr_t & addr)
}
}

#endif // INET_CONFIG_ENABLE_IPV4 || LWIP_IPV4

#if INET_CONFIG_ENABLE_IPV4

ip4_addr_t IPAddress::ToIPv4() const
{
ip4_addr_t ipAddr;
Expand Down
2 changes: 1 addition & 1 deletion src/inet/IPAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class DLL_EXPORT IPAddress

#if CHIP_SYSTEM_CONFIG_USE_LWIP
explicit IPAddress(const ip6_addr_t & ipv6Addr);
#if INET_CONFIG_ENABLE_IPV4
#if INET_CONFIG_ENABLE_IPV4 || LWIP_IPV4
explicit IPAddress(const ip4_addr_t & ipv4Addr);
explicit IPAddress(const ip_addr_t & addr);
#endif // INET_CONFIG_ENABLE_IPV4
Expand Down