about summary refs log tree commit diff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/main.cc')
-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;
         }
     }