  	now = time (0);		/* fake timeout if interrupt & time expired */
  	if ((i < 0) && (errno == EINTR) && ti && (ti <= now)) i = 0;
        } while ((i < 0) && (errno == EINTR));
-@@ -302,7 +288,7 @@ int tcp_socket_open (int family,void *adr,size_t adrlen,unsigned short port,
+@@ -302,7 +288,7 @@
  	fcntl (sock,F_SETFL,flgs);
  	/* This used to be a zero-byte read(), but that crashes Solaris */
  				/* get socket status */

       }	
       if (i <= 0) {		/* timeout or error? */
 	i = i ? errno : ETIMEDOUT;/* determine error code */
@@ -545,9 +531,8 @@ long tcp_getbuffer (TCPSTREAM *stream,unsigned long size,char *s)
     stream->ictr -=n;
   }
   if (size) {

 
 
 #include "fs_unix.c"
Index: uw-imap/src/osdep/unix/os_slx.c
===================================================================
--- uw-imap.orig/src/osdep/unix/os_slx.c	2014-04-24 15:21:50.000000000 +0100
+++ uw-imap/src/osdep/unix/os_slx.c	2014-06-04 15:24:47.000000000 +0100
@@ -42,6 +42,7 @@
 #include <pwd.h>
 #include <shadow.h>
 #include "misc.h"
