]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/uxcons.c
A bunch of further warning fixes in the Windows code.
[PuTTY.git] / unix / uxcons.c
index f2a25f3fed70f90c17a9968ca000fdf9d02a9a3e..716f3fc533d653ccb0b6fa9751124d3df0a7d22f 100644 (file)
 #include <termios.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <sys/time.h>
+#ifndef HAVE_NO_SYS_SELECT_H
 #include <sys/select.h>
+#endif
 
 #include "putty.h"
 #include "storage.h"
@@ -98,7 +101,9 @@ static int block_and_read(int fd, void *buf, size_t len)
         fd_set rfds;
         FD_ZERO(&rfds);
         FD_SET(fd, &rfds);
-        ret = select(fd+1, &rfds, NULL, NULL, NULL);
+        do {
+            ret = select(fd+1, &rfds, NULL, NULL, NULL);
+        } while (ret < 0 && errno == EINTR);
         assert(ret != 0);
         if (ret < 0)
             return ret;