mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +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:
parent
16582d3834
commit
b34608fbdd
@ -30,7 +30,7 @@
|
|||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* 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.182.2.1 2006/01/24 16:38:50 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1183,7 +1183,7 @@ pq_getkeepalivesidle(Port *port)
|
|||||||
|
|
||||||
if (port->default_keepalives_idle == 0)
|
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,
|
if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPIDLE,
|
||||||
(char *) &port->default_keepalives_idle,
|
(char *) &port->default_keepalives_idle,
|
||||||
@ -1255,7 +1255,7 @@ pq_getkeepalivesinterval(Port *port)
|
|||||||
|
|
||||||
if (port->default_keepalives_interval == 0)
|
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,
|
if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPINTVL,
|
||||||
(char *) &port->default_keepalives_interval,
|
(char *) &port->default_keepalives_interval,
|
||||||
@ -1327,7 +1327,7 @@ pq_getkeepalivescount(Port *port)
|
|||||||
|
|
||||||
if (port->default_keepalives_count == 0)
|
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,
|
if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPCNT,
|
||||||
(char *) &port->default_keepalives_count,
|
(char *) &port->default_keepalives_count,
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.73 2005/10/24 15:38:37 momjian Exp $
|
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.73.2.1 2006/01/24 16:38:50 tgl Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
|
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
|
||||||
@ -527,7 +527,7 @@ verify_peer(PGconn *conn)
|
|||||||
struct hostent *h = NULL;
|
struct hostent *h = NULL;
|
||||||
struct sockaddr addr;
|
struct sockaddr addr;
|
||||||
struct sockaddr_in *sin;
|
struct sockaddr_in *sin;
|
||||||
socklen_t len;
|
ACCEPT_TYPE_ARG3 len;
|
||||||
char **s;
|
char **s;
|
||||||
unsigned long l;
|
unsigned long l;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user