about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-06-28T13·38+0200
committerEelco Dolstra <edolstra@gmail.com>2019-06-28T13·38+0200
commit6847c9278840edc97f1ef85b5fafac4338fb1b37 (patch)
treeaa717284be31263bf1ae3be9cc5a993acfabcaf2 /src
parent324a5dc92f8e50e6b637c5e67dea48c80be10837 (diff)
Fix macOS build failure
Issue #2976.
Diffstat (limited to 'src')
-rw-r--r--src/nix/main.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 73c4b8db1123..a80fd0ea62fc 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -39,8 +39,8 @@ static bool haveInternet()
                 return true;
             }
         } else if (i->ifa_addr->sa_family == AF_INET6) {
-            if (!IN6_IS_ADDR_LOOPBACK(((sockaddr_in6 *) i->ifa_addr)->sin6_addr.s6_addr) &&
-                !IN6_IS_ADDR_LINKLOCAL(((sockaddr_in6 *) i->ifa_addr)->sin6_addr.s6_addr))
+            if (!IN6_IS_ADDR_LOOPBACK(&((sockaddr_in6 *) i->ifa_addr)->sin6_addr) &&
+                !IN6_IS_ADDR_LINKLOCAL(&((sockaddr_in6 *) i->ifa_addr)->sin6_addr))
                 return true;
         }
     }