Index: src/interfaces/libpq/fe-secure.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/libpq/fe-secure.c,v
retrieving revision 1.24
diff -c -c -r1.24 fe-secure.c
*** src/interfaces/libpq/fe-secure.c	14 Jun 2003 17:49:54 -0000	1.24
--- src/interfaces/libpq/fe-secure.c	14 Jun 2003 18:08:54 -0000
***************
*** 453,460 ****
  	if (addr.sa_family == AF_UNIX)
  		return 0;
  
  	/* what do we know about the peer's common name? */
! 	if ((h = gethostbyname(conn->peer_cn)) == NULL)
  	{
  		printfPQExpBuffer(&conn->errorMessage,
  		libpq_gettext("could not get information about host (%s): %s\n"),
--- 453,469 ----
  	if (addr.sa_family == AF_UNIX)
  		return 0;
  
+ 	{
+ 		struct hostent hpstr;
+ 		char buf[BUFSIZ];
+ 		int herrno = 0;
+ 
+ 		pqGethostbyname(conn->peer_cn, &hpstr, buf, sizeof(buf),
+ 		                &h, &herrno);
+ 	}
+ 	
  	/* what do we know about the peer's common name? */
! 	if ((h == NULL)
  	{
  		printfPQExpBuffer(&conn->errorMessage,
  		libpq_gettext("could not get information about host (%s): %s\n"),
Index: src/port/getaddrinfo.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/port/getaddrinfo.c,v
retrieving revision 1.7
diff -c -c -r1.7 getaddrinfo.c
*** src/port/getaddrinfo.c	12 Jun 2003 08:15:29 -0000	1.7
--- src/port/getaddrinfo.c	14 Jun 2003 18:08:55 -0000
***************
*** 84,91 ****
--- 84,99 ----
  		else
  		{
  			struct hostent *hp;
+ #ifdef FRONTEND
+ 			struct hostent hpstr;
+ 			char buf[BUFSIZ];
+ 			int herrno = 0;
  
+ 			pqGethostbyname(node, &hpstr, buf, sizeof(buf),
+ 			                &hp, &herrno);
+ #else
  			hp = gethostbyname(node);
+ #endif
  			if (hp == NULL)
  			{
  				switch (h_errno)
