diff options
Diffstat (limited to 'src/port/getaddrinfo.c')
-rw-r--r-- | src/port/getaddrinfo.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/port/getaddrinfo.c b/src/port/getaddrinfo.c index 2f2449629b6..1cfee0485bd 100644 --- a/src/port/getaddrinfo.c +++ b/src/port/getaddrinfo.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/port/getaddrinfo.c,v 1.7 2003/06/12 08:15:29 momjian Exp $ + * $Header: /cvsroot/pgsql/src/port/getaddrinfo.c,v 1.8 2003/06/14 18:20:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -84,8 +84,16 @@ getaddrinfo(const char *node, const char *service, 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) |