Commit d08007ae authored by Tom Lane's avatar Tom Lane

Make getaddrinfo's behavior with NULL node parameter agree with the

Linux man page for it.  This error was preventing CVS tip from accepting
remote connections.
parent 1045655a
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/port/getaddrinfo.c,v 1.2 2003/04/02 00:49:28 tgl Exp $
* $Header: /cvsroot/pgsql/src/port/getaddrinfo.c,v 1.3 2003/04/27 23:56:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -77,12 +77,14 @@ getaddrinfo(const char *node, const char *service,
if (hp->h_addrtype != AF_INET)
return EAI_ADDRFAMILY;
memmove(&(sin.sin_addr), hp->h_addr, hp->h_length);
memcpy(&(sin.sin_addr), hp->h_addr, hp->h_length);
}
}
else
{
if (hints->ai_flags & AI_PASSIVE)
sin.sin_addr.s_addr = htonl(INADDR_ANY);
else
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment