[posix] fix macOS build with PLATFORM_NETIF=1 (#5318)

This commit is contained in:
Jonathan Hui
2020-08-01 10:54:20 -07:00
committed by GitHub
parent 075017bedc
commit 3b877e54ae
+2 -2
View File
@@ -292,8 +292,8 @@ static void InitNetaskWithPrefixLength(struct in6_addr *address, uint8_t prefixL
static uint8_t NetmaskToPrefixLength(const struct sockaddr_in6 *netmask)
{
return otIp6PrefixMatch(static_cast<const otIp6Address *>(netmask->sin6_addr.s6_addr),
static_cast<const otIp6Address *>(allOnes));
return otIp6PrefixMatch(reinterpret_cast<const otIp6Address *>(netmask->sin6_addr.s6_addr),
reinterpret_cast<const otIp6Address *>(allOnes));
}
#endif