Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7a9d197

Browse files
committed
Fix unportable usage of socklen_t: should use ACCEPT_TYPE_ARG3 macro
provided by configure, instead. Per bug #2205.
1 parent 69f9fab commit 7a9d197

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/backend/libpq/pqcomm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
3131
* Portions Copyright (c) 1994, Regents of the University of California
3232
*
33-
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.182 2005/10/17 16:24:19 tgl Exp $
33+
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.183 2006/01/24 16:38:42 tgl Exp $
3434
*
3535
*-------------------------------------------------------------------------
3636
*/
@@ -1183,7 +1183,7 @@ pq_getkeepalivesidle(Port *port)
11831183

11841184
if (port->default_keepalives_idle == 0)
11851185
{
1186-
socklen_t size = sizeof(port->default_keepalives_idle);
1186+
ACCEPT_TYPE_ARG3 size = sizeof(port->default_keepalives_idle);
11871187

11881188
if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPIDLE,
11891189
(char *) &port->default_keepalives_idle,
@@ -1255,7 +1255,7 @@ pq_getkeepalivesinterval(Port *port)
12551255

12561256
if (port->default_keepalives_interval == 0)
12571257
{
1258-
socklen_t size = sizeof(port->default_keepalives_interval);
1258+
ACCEPT_TYPE_ARG3 size = sizeof(port->default_keepalives_interval);
12591259

12601260
if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPINTVL,
12611261
(char *) &port->default_keepalives_interval,
@@ -1327,7 +1327,7 @@ pq_getkeepalivescount(Port *port)
13271327

13281328
if (port->default_keepalives_count == 0)
13291329
{
1330-
socklen_t size = sizeof(port->default_keepalives_count);
1330+
ACCEPT_TYPE_ARG3 size = sizeof(port->default_keepalives_count);
13311331

13321332
if (getsockopt(port->sock, IPPROTO_TCP, TCP_KEEPCNT,
13331333
(char *) &port->default_keepalives_count,

src/interfaces/libpq/fe-secure.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.73 2005/10/24 15:38:37 momjian Exp $
14+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.74 2006/01/24 16:38:42 tgl Exp $
1515
*
1616
* NOTES
1717
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -527,7 +527,7 @@ verify_peer(PGconn *conn)
527527
struct hostent *h = NULL;
528528
struct sockaddr addr;
529529
struct sockaddr_in *sin;
530-
socklen_t len;
530+
ACCEPT_TYPE_ARG3 len;
531531
char **s;
532532
unsigned long l;
533533

0 commit comments

Comments
 (0)