Commit 7a9d197f authored by Tom Lane's avatar Tom Lane

Fix unportable usage of socklen_t: should use ACCEPT_TYPE_ARG3 macro

provided by configure, instead.  Per bug #2205.
parent 69f9fab1
...@@ -30,7 +30,7 @@ ...@@ -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.183 2006/01/24 16:38:42 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1183,7 +1183,7 @@ pq_getkeepalivesidle(Port *port) ...@@ -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) ...@@ -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) ...@@ -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 @@ ...@@ -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.74 2006/01/24 16:38:42 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) ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment