I’m not sure what’s the best way to build the thing, but if you check it out from keithp’s CVS and do:

$> imake -I/cvs/xorg/config/cf
$> make

then it seems to build just fine if you remove the malloc() prototype in common.c. Of course, if you have a space between the -I and the path to the xorg build on the imake command line, then you could find yourself spending a long time trying to figure out wtf is wrong.

Oh, yeah, one final tip. xscope is a proxy Xserver. So, when you connect your app to xscope, Xlib goes looking in ~/.Xauthority for an xauth cookie to use when authenticating. Because xscope has a different display number from the parent display, though, you need to use xauth to setup the cookie for this display number too. So, assuming the parent display is :0 and xscope is :1, you can do: