mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Fix unportable usage of socklen_t: should use ACCEPT_TYPE_ARG3 macro
provided by configure, instead. Per bug #2205.
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.182 2005/10/17 16:24:19 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.183 2006/01/24 16:38:42 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1183,7 +1183,7 @@ pq_getkeepalivesidle(Port *port)
|
||||
|
||||
if (port->default_keepalives_idle == 0)
|
||||
{
|
||||
socklen_t size = sizeof(port->default_keepalives_idle);
|
||||
ACCEPT_TYPE_ARG3 size = sizeof(port->default_keepalives_idle);
|
||||
|
||||
if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPIDLE,
|
||||
(char *) &port->default_keepalives_idle,
|
||||
@ -1255,7 +1255,7 @@ pq_getkeepalivesinterval(Port *port)
|
||||
|
||||
if (port->default_keepalives_interval == 0)
|
||||
{
|
||||
socklen_t size = sizeof(port->default_keepalives_interval);
|
||||
ACCEPT_TYPE_ARG3 size = sizeof(port->default_keepalives_interval);
|
||||
|
||||
if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPINTVL,
|
||||
(char *) &port->default_keepalives_interval,
|
||||
@ -1327,7 +1327,7 @@ pq_getkeepalivescount(Port *port)
|
||||
|
||||
if (port->default_keepalives_count == 0)
|
||||
{
|
||||
socklen_t size = sizeof(port->default_keepalives_count);
|
||||
ACCEPT_TYPE_ARG3 size = sizeof(port->default_keepalives_count);
|
||||
|
||||
if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPCNT,
|
||||
(char *) &port->default_keepalives_count,
|
||||
|
Reference in New Issue
Block a user