ffmpeg upgrade from 4.3 to 4.4 / Andrew fixed patches except patch2/B by Freelancer
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / src / libxcb.patch1
1 diff --git a/configure.ac b/configure.ac
2 index f880918..66e24a0 100644
3 --- a/configure.ac
4 +++ b/configure.ac
5 @@ -51,7 +51,7 @@ AC_SUBST(HTML_CHECK_RESULT)
6  
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)
12  
13  have_xdmcp="no"
14 diff --git a/src/xcb_in.c b/src/xcb_in.c
15 index 73209e0..0dd7314 100644
16 --- a/src/xcb_in.c
17 +++ b/src/xcb_in.c
18 @@ -966,7 +966,7 @@ void _xcb_in_replies_done(xcb_connection_t *c)
19  
20  int _xcb_in_read(xcb_connection_t *c)
21  {
22 -    int n;
23 +    int n, err;
24  
25  #if HAVE_SENDMSG
26      struct iovec    iov = {
27 @@ -999,6 +999,7 @@ int _xcb_in_read(xcb_connection_t *c)
28  #else
29      n = recv(c->fd, c->in.queue + c->in.queue_len, sizeof(c->in.queue) - c->in.queue_len, 0);
30  #endif
31 +    err = errno;
32      if(n > 0) {
33  #if HAVE_SENDMSG
34          struct cmsghdr *hdr;
35 @@ -1039,7 +1040,7 @@ int _xcb_in_read(xcb_connection_t *c)
36      }
37  #endif
38  #ifndef _WIN32
39 -    if((n > 0) || (n < 0 && errno == EAGAIN))
40 +    if((n > 0) || (n < 0 && (err == EAGAIN || err == ENOENT || err == 0)))
41  #else
42      if((n > 0) || (n < 0 && WSAGetLastError() == WSAEWOULDBLOCK))
43  #endif /* !_WIN32 */