Unless you supply --disable-threads to configure, libX11 will be built with threading support, XTHREADS is defined by the configure.ac. But all the other libraries making up 'xlibs' are built without, so LockDisplay(), and so forth, compile to no-ops. One fix would be to, when libX11 is built with threading support, add -DXTHREADS to Cflags in X11.pc. This would also help apps that use XlibInt.c.
An alternative fix was added to libX11 some time ago: Xlibint.h is now generated from Xlibint.h.in, with "#define XTHREADS" added if libX11 was built with XTHREADS.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.