]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2005-05-17 Neal H. Walfield <neal@gnu.org>
authorRoland McGrath <roland@gnu.org>
Sun, 16 Oct 2005 10:15:30 +0000 (10:15 +0000)
committerRoland McGrath <roland@gnu.org>
Sun, 16 Oct 2005 10:15:30 +0000 (10:15 +0000)
[BZ #1350]
* sysdeps/posix/getaddrinfo.c (gaih_local): Check [_HAVE_SA_LEN]
instead of [SALEN].
(gaih_inet): Likewise.
2005-02-16  Roland McGrath  <roland@redhat.com>

* sysdeps/posix/getaddrinfo.c (gaih_inet): Fix type of ADDR local.

sysdeps/posix/getaddrinfo.c

index c9081345aba22f1d510fbce848903ef05c4119fe..d97b95b5e03c3849211a7fc4e1944eda544c1946 100644 (file)
@@ -196,10 +196,10 @@ gaih_local (const char *name, const struct gaih_service *service,
   (*pai)->ai_addrlen = sizeof (struct sockaddr_un);
   (*pai)->ai_addr = (void *) (*pai) + sizeof (struct addrinfo);
 
-#if SALEN
+#ifdef _HAVE_SA_LEN
   ((struct sockaddr_un *) (*pai)->ai_addr)->sun_len =
     sizeof (struct sockaddr_un);
-#endif /* SALEN */
+#endif /* _HAVE_SA_LEN */
 
   ((struct sockaddr_un *)(*pai)->ai_addr)->sun_family = AF_LOCAL;
   memset(((struct sockaddr_un *)(*pai)->ai_addr)->sun_path, 0, UNIX_PATH_MAX);
@@ -680,7 +680,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
                                    h->h_length);
                          else
                            {
-                             int32_t *addr = (uint32_t *) (*pat)->addr;
+                             uint32_t *addr = (uint32_t *) (*pat)->addr;
                              addr[3] = *(uint32_t *) h->h_addr_list[i];
                              addr[2] = htonl (0xffff);
                              addr[1] = 0;
@@ -1076,9 +1076,9 @@ gaih_inet (const char *name, const struct gaih_service *service,
            ai->ai_canonname = (char *) canon;
            canon = NULL;
 
-#if SALEN
+#ifdef _HAVE_SA_LEN
            ai->ai_addr->sa_len = socklen;
-#endif /* SALEN */
+#endif /* _HAVE_SA_LEN */
            ai->ai_addr->sa_family = family;
 
            if (family == AF_INET6)