X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_conn.c;h=f25cc207cf0c0fb86455c056e9b5a8c5371b317b;hb=771761ccaad31d029d470dde84279e94494310b6;hp=51f8eaa819a70e37d204c58c9f5903a58124be5b;hpb=d69c403cba9bdebd1bd41b62ae7e28f5852248d4;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_conn.c b/src/xcb_conn.c index 51f8eaa..f25cc20 100644 --- a/src/xcb_conn.c +++ b/src/xcb_conn.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include "xcb.h" @@ -169,7 +169,7 @@ static int write_vec(XCBConnection *c, struct iovec **vector, int *count) /* Public interface */ -XCBConnSetupSuccessRep *XCBGetSetup(XCBConnection *c) +const XCBConnSetupSuccessRep *XCBGetSetup(XCBConnection *c) { /* doesn't need locking because it's never written to. */ return c->setup; @@ -253,7 +253,11 @@ int _xcb_conn_wait(XCBConnection *c, pthread_cond_t *cond, struct iovec **vector } pthread_mutex_unlock(&c->iolock); - ret = select(c->fd + 1, &rfds, &wfds, 0, 0) > 0; + do { + ret = select(c->fd + 1, &rfds, &wfds, 0, 0); + } while (ret == -1 && errno == EINTR); + if (ret < 0) + ret = 0; pthread_mutex_lock(&c->iolock); if(ret)