|
30 | 30 | * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group |
31 | 31 | * Portions Copyright (c) 1994, Regents of the University of California |
32 | 32 | * |
33 | | - *$PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.177 2005/07/3015:17:20momjian Exp $ |
| 33 | + *$PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.178 2005/07/3020:28:20tgl Exp $ |
34 | 34 | * |
35 | 35 | *------------------------------------------------------------------------- |
36 | 36 | */ |
@@ -1185,7 +1185,7 @@ pq_getkeepalivesidle(Port *port) |
1185 | 1185 | if (port->default_keepalives_idle==0) |
1186 | 1186 | { |
1187 | 1187 | socklen_tsize=sizeof(port->default_keepalives_idle); |
1188 | | -if (getsockopt(port->sock,SOL_TCP,TCP_KEEPIDLE, |
| 1188 | +if (getsockopt(port->sock,IPPROTO_TCP,TCP_KEEPIDLE, |
1189 | 1189 | (char*)&port->default_keepalives_idle, |
1190 | 1190 | &size)<0) |
1191 | 1191 | { |
@@ -1219,7 +1219,7 @@ pq_setkeepalivesidle(int idle, Port *port) |
1219 | 1219 | if (idle==0) |
1220 | 1220 | idle=port->default_keepalives_idle; |
1221 | 1221 |
|
1222 | | -if (setsockopt(port->sock,SOL_TCP,TCP_KEEPIDLE, |
| 1222 | +if (setsockopt(port->sock,IPPROTO_TCP,TCP_KEEPIDLE, |
1223 | 1223 | (char*)&idle,sizeof(idle))<0) |
1224 | 1224 | { |
1225 | 1225 | elog(LOG,"setsockopt(TCP_KEEPIDLE) failed: %m"); |
@@ -1251,7 +1251,7 @@ pq_getkeepalivesinterval(Port *port) |
1251 | 1251 | if (port->default_keepalives_interval==0) |
1252 | 1252 | { |
1253 | 1253 | socklen_tsize=sizeof(port->default_keepalives_interval); |
1254 | | -if (getsockopt(port->sock,SOL_TCP,TCP_KEEPINTVL, |
| 1254 | +if (getsockopt(port->sock,IPPROTO_TCP,TCP_KEEPINTVL, |
1255 | 1255 | (char*)&port->default_keepalives_interval, |
1256 | 1256 | &size)<0) |
1257 | 1257 | { |
@@ -1284,7 +1284,7 @@ pq_setkeepalivesinterval(int interval, Port *port) |
1284 | 1284 | if (interval==0) |
1285 | 1285 | interval=port->default_keepalives_interval; |
1286 | 1286 |
|
1287 | | -if (setsockopt(port->sock,SOL_TCP,TCP_KEEPINTVL, |
| 1287 | +if (setsockopt(port->sock,IPPROTO_TCP,TCP_KEEPINTVL, |
1288 | 1288 | (char*)&interval,sizeof(interval))<0) |
1289 | 1289 | { |
1290 | 1290 | elog(LOG,"setsockopt(TCP_KEEPINTVL) failed: %m"); |
@@ -1316,7 +1316,7 @@ pq_getkeepalivescount(Port *port) |
1316 | 1316 | if (port->default_keepalives_count==0) |
1317 | 1317 | { |
1318 | 1318 | socklen_tsize=sizeof(port->default_keepalives_count); |
1319 | | -if (getsockopt(port->sock,SOL_TCP,TCP_KEEPCNT, |
| 1319 | +if (getsockopt(port->sock,IPPROTO_TCP,TCP_KEEPCNT, |
1320 | 1320 | (char*)&port->default_keepalives_count, |
1321 | 1321 | &size)<0) |
1322 | 1322 | { |
@@ -1349,7 +1349,7 @@ pq_setkeepalivescount(int count, Port *port) |
1349 | 1349 | if (count==0) |
1350 | 1350 | count=port->default_keepalives_count; |
1351 | 1351 |
|
1352 | | -if (setsockopt(port->sock,SOL_TCP,TCP_KEEPCNT, |
| 1352 | +if (setsockopt(port->sock,IPPROTO_TCP,TCP_KEEPCNT, |
1353 | 1353 | (char*)&count,sizeof(count))<0) |
1354 | 1354 | { |
1355 | 1355 | elog(LOG,"setsockopt(TCP_KEEPCNT) failed: %m"); |
|