diff -Naru libX11-1.7.2/src/xcb_io.c libX11-1.7.2-sw/src/xcb_io.c
--- libX11-1.7.2/src/xcb_io.c	2021-06-06 16:48:53.000000000 +0000
+++ libX11-1.7.2-sw/src/xcb_io.c	2022-09-01 03:24:00.479452203 +0000
@@ -542,7 +542,7 @@
 	static const xReq dummy_request;
 	static char const pad[3];
 	struct iovec vec[3];
-	uint64_t requests;
+	unsigned long requests;
 	uint64_t dpy_request;
 	_XExtension *ext;
 	xcb_connection_t *c = dpy->xcb->connection;
@@ -563,7 +563,7 @@
 	if(dpy->xcb->event_owner != XlibOwnsEventQueue || dpy->async_handlers)
 	{
 		uint64_t sequence;
-		for(sequence = dpy->xcb->last_flushed + 1; sequence <= dpy_request; ++sequence)
+		for(sequence = dpy->xcb->last_flushed + 1; (unsigned long)sequence <= dpy_request; ++sequence)
 			append_pending_request(dpy, sequence);
 	}
 	requests = dpy_request - dpy->xcb->last_flushed;
