diff --git a/modules/juce_core/native/juce_mac_Network.mm b/modules/juce_core/native/juce_mac_Network.mm index 5ea85d7e88..7e2b60ee8e 100644 --- a/modules/juce_core/native/juce_mac_Network.mm +++ b/modules/juce_core/native/juce_mac_Network.mm @@ -32,10 +32,10 @@ void MACAddress::findAllAddresses (Array& result) for (const ifaddrs* cursor = addrs; cursor != nullptr; cursor = cursor->ifa_next) { // Required to avoid misaligned pointer access - sockaddr_storage sto; - std::memcpy (&sto, cursor->ifa_addr, sizeof (sockaddr_storage)); + sockaddr sto; + std::memcpy (&sto, cursor->ifa_addr, sizeof (sockaddr)); - if (sto.ss_family == AF_LINK) + if (sto.sa_family == AF_LINK) { auto sadd = (const sockaddr_dl*) cursor->ifa_addr;