From b34608fbdda2b872b35400075f724f12aa4f6b13 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 24 Jan 2006 16:38:50 +0000 Subject: [PATCH] Fix unportable usage of socklen_t: should use ACCEPT_TYPE_ARG3 macro provided by configure, instead. Per bug #2205. --- src/backend/libpq/pqcomm.c | 8 ++++---- src/interfaces/libpq/fe-secure.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 12be7e2c5da..d4475e8b56c 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -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.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) { - 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, diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index 9711b210857..096457f7010 100644 --- a/src/interfaces/libpq/fe-secure.c +++ b/src/interfaces/libpq/fe-secure.c @@ -11,7 +11,7 @@ * * * 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 * [ Most of these notes are wrong/obsolete, but perhaps not all ] @@ -527,7 +527,7 @@ verify_peer(PGconn *conn) struct hostent *h = NULL; struct sockaddr addr; struct sockaddr_in *sin; - socklen_t len; + ACCEPT_TYPE_ARG3 len; char **s; unsigned long l;