Index: src/interfaces/libpq/fe-connect.c =================================================================== RCS file: /cvsroot/pgsql-server/src/interfaces/libpq/fe-connect.c,v retrieving revision 1.192 diff -c -r1.192 fe-connect.c *** src/interfaces/libpq/fe-connect.c 17 Aug 2002 12:33:17 -0000 1.192 --- src/interfaces/libpq/fe-connect.c 18 Aug 2002 00:04:07 -0000 *************** *** 19,24 **** --- 19,25 ---- #include #include #include + #include #include "libpq-fe.h" #include "libpq-int.h" *************** *** 1078,1095 **** } ! while (NULL == rp || remains.tv_sec > 0 || remains.tv_sec == 0 && remains.tv_usec > 0) { /* * If connecting timeout is set, get current time. */ ! if ( NULL != rp && -1 == gettimeofday(&start_time, NULL)) { conn->status = CONNECTION_BAD; return 0; } ! /* * Wait, if necessary. Note that the initial state (just after * PQconnectStart) is to wait for the socket to select for * writing. --- 1079,1096 ---- } ! while (rp == NULL || remains.tv_sec > 0 || (remains.tv_sec == 0 && remains.tv_usec > 0)) { /* * If connecting timeout is set, get current time. */ ! if (rp != NULL && gettimeofday(&start_time, NULL) == -1) { conn->status = CONNECTION_BAD; return 0; } ! /* * Wait, if necessary. Note that the initial state (just after * PQconnectStart) is to wait for the socket to select for * writing.