mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Remove use of large BUFSIZ for buffers and use the proper struct sizes.
This greatly helps threaded libpq programs.
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
* Copyright (c) 2003, PostgreSQL Global Development Group
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/port/getaddrinfo.c,v 1.13 2004/09/27 23:24:45 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/port/getaddrinfo.c,v 1.14 2004/09/27 23:39:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -85,7 +85,7 @@ getaddrinfo(const char *node, const char *service,
|
||||
|
||||
#ifdef FRONTEND
|
||||
struct hostent hpstr;
|
||||
char buf[BUFSIZ];
|
||||
char buf[sizeof(struct hostent)];
|
||||
int herrno = 0;
|
||||
|
||||
pqGethostbyname(node, &hpstr, buf, sizeof(buf),
|
||||
|
Reference in New Issue
Block a user