chiark / gitweb /
Initialize the right scope field
[elogind.git] / nss-myhostname.c
index d3404de5aef822e445452b697b0a5e4adeb7d54f..14ed30b8929d34fb978628e0e343709f714224bf 100644 (file)
@@ -1,6 +1,5 @@
 /*-*- Mode: C; c-basic-offset: 8 -*-*/
 
-
 /***
     This file is part of nss-myhostname.
 
     <http://www.gnu.org/licenses/>.
 ***/
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <limits.h>
 #include <nss.h>
 #include <sys/types.h>
@@ -100,7 +103,7 @@ enum nss_status _nss_myhostname_gethostbyname4_r(
         r_tuple2->name = r_name;
         r_tuple2->family = AF_INET6;
         memcpy(r_tuple2->addr, LOCALADDRESS_IPV6, 16);
-        r_tuple1->scopeid = (uint32_t) ifi;
+        r_tuple2->scopeid = (uint32_t) ifi;
         idx += ALIGN(sizeof(struct gaih_addrtuple));
 
         /* Verify the size matches */