Skip to content

Commit

Permalink
2005-05-17 Neal H. Walfield <neal@gnu.org>
Browse files Browse the repository at this point in the history
	* sysdeps/posix/getaddrinfo.c (gaih_local): Check [_HAVE_SA_LEN]
	instead of [SALEN].
	(gaih_inet): Likewise.
  • Loading branch information
Roland McGrath committed May 18, 2005
1 parent 99878f8 commit beb3264
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sysdeps/posix/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit beb3264

Please sign in to comment.