From 33ac9442386f6750636e602c6febc91a25536adc Mon Sep 17 00:00:00 2001 From: wessels <> Date: Tue, 12 Jan 1999 04:29:46 +0000 Subject: [PATCH] portability problem for non-blocking connect() with sony newsos --- src/comm.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/comm.cc b/src/comm.cc index cb242836e1..d30f1d407e 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.294 1999/01/08 21:12:08 wessels Exp $ + * $Id: comm.cc,v 1.295 1999/01/11 21:29:46 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -413,6 +413,16 @@ comm_connect_addr(int sock, const struct sockaddr_in *address) if (x < 0) debug(5, 9) ("connect FD %d: %s\n", sock, xstrerror()); } else { +#if defined(sony) + /* Makoto MATSUSHITA */ + connect(sock, (struct sockaddr *) address, sizeof(*address)); + if (errno == EINVAL) { + errlen = sizeof(err); + x = getsockopt(sock, SOL_SOCKET, SO_ERROR, &err, &errlen); + if (x >= 0) + errno = x; + } +#else errlen = sizeof(err); x = getsockopt(sock, SOL_SOCKET, SO_ERROR, &err, &errlen); if (x == 0) @@ -426,6 +436,7 @@ comm_connect_addr(int sock, const struct sockaddr_in *address) */ if (x < 0 && errno == EPIPE) errno = ENOTCONN; +#endif #endif } if (errno == 0 || errno == EISCONN) -- 2.47.3