aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-01-29 15:29:47 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-01-29 15:29:47 +0000
commit76a51ef4b3c4d1db80223a57ff9928019d3312cb (patch)
treeb147711a72f90961d9de4c721c19b4b288dd6644
parentfc7c4d6157fedcc4c4cf8618f80930d921a432b9 (diff)
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
-rw-r--r--lib/connect.c11
1 files changed, 10 insertions, 1 deletions
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 <sys/time.h>
-#include <sys/socket.h>
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
#include <sys/ioctl.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -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);