Portability fixes. Should help DragonFly and Solaris, and should not hurt anything...
[free-sw/xcb/libxcb] / src / xcb_out.c
index c4ef737..10ef775 100644 (file)
@@ -101,7 +101,7 @@ unsigned int XCBSendRequest(XCBConnection *c, int flags, struct iovec *vector, c
             longlen += vector[i].iov_len;
             if(!vector[i].iov_base)
             {
-                vector[i].iov_base = (caddr_t) pad;
+                vector[i].iov_base = (char *) pad;
                 assert(vector[i].iov_len <= sizeof(pad));
             }
         }
@@ -136,7 +136,7 @@ unsigned int XCBSendRequest(XCBConnection *c, int flags, struct iovec *vector, c
     while(c->out.writing)
         pthread_cond_wait(&c->out.cond, &c->iolock);
 
-    if(req->isvoid && c->out.request == c->in.request_expected + (1 << 16) - 1)
+    if(req->isvoid && c->out.request == c->in.request_expected + (1 << 16) - 2)
     {
         prefix[0] = sync.packet;
         request = ++c->out.request;