1 diff --git a/configure.ac b/configure.ac
2 index f880918..66e24a0 100644
5 @@ -51,7 +51,7 @@ AC_SUBST(HTML_CHECK_RESULT)
7 # Checks for pkg-config packages
8 PKG_CHECK_MODULES(XCBPROTO, xcb-proto >= 1.13)
9 -NEEDED="pthread-stubs xau >= 0.99.2"
10 +NEEDED="xau >= 0.99.2"
11 PKG_CHECK_MODULES(NEEDED, $NEEDED)
14 diff --git a/src/xcb_in.c b/src/xcb_in.c
15 index 73209e0..0dd7314 100644
18 @@ -966,7 +966,7 @@ void _xcb_in_replies_done(xcb_connection_t *c)
20 int _xcb_in_read(xcb_connection_t *c)
27 @@ -999,6 +999,7 @@ int _xcb_in_read(xcb_connection_t *c)
29 n = recv(c->fd, c->in.queue + c->in.queue_len, sizeof(c->in.queue) - c->in.queue_len, 0);
35 @@ -1039,7 +1040,7 @@ int _xcb_in_read(xcb_connection_t *c)
39 - if((n > 0) || (n < 0 && errno == EAGAIN))
40 + if((n > 0) || (n < 0 && (err == EAGAIN || err == ENOENT || err == 0)))
42 if((n > 0) || (n < 0 && WSAGetLastError() == WSAEWOULDBLOCK))