From 76a51ef4b3c4d1db80223a57ff9928019d3312cb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 29 Jan 2004 15:29:47 +0000 Subject: 1. changed order of two include files to build fine on MPE/iX 2. now reads the socket error before check connect status, also to make us run fine on MPE/iX --- lib/connect.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/connect.c b/lib/connect.c index 69f8ce374..0d8d278f8 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -26,8 +26,12 @@ #ifndef WIN32 /* headers for non-win32 */ #include -#include +#ifdef HAVE_SYS_TYPES_H #include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif #include #ifdef HAVE_UNISTD_H #include @@ -171,6 +175,11 @@ int waitconnect(int sockfd, /* socket */ struct timeval interval; int rc; + /* Call this function once now, and ignore the results. We do this to + "clear" the error state on the socket so that we can later read it + reliably. This is reported necessary on the MPE/iX operating system. */ + verifyconnect(); + /* now select() until we get connect or timeout */ FD_ZERO(&fd); FD_SET(sockfd, &fd); -- cgit v1.2.3