--- /dev/null
+diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
+index da1e731..1adfb41 100644
+--- a/hw/dmx/input/dmxinputinit.c
++++ b/hw/dmx/input/dmxinputinit.c
+@@ -865,7 +865,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
+
+ /* Print out information about the XInput Extension. */
+ handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
+- ext = XQueryInputVersion(display, XI_2_Major, XI_2_Minor);
++ ext = XGetExtensionVersion(display, INAME);
+ XSetExtensionErrorHandler(handler);
+
+ if (!ext || ext == (XExtensionVersion *)NoSuchExtension) {
--- /dev/null
+--- xorg-server-1.5.99.2/hw/dmx/glxProxy/glxutil.c~ 2008-11-14 22:27:05.000000000 +0100
++++ xorg-server-1.5.99.2/hw/dmx/glxProxy/glxutil.c 2008-12-03 10:26:14.431540404 +0100
+@@ -36,6 +36,11 @@
+ #include <windowstr.h>
+ #include "glxutil.h"
+
++#undef Xmalloc
++#undef Xcalloc
++#undef Xrealloc
++#undef Xfree
++
+ /************************************************************************/
+
+ void __glXNop(void) {}
+--- xorg-server-1.5.99.2/hw/dmx/glxProxy/glxvisuals.c~ 2008-11-14 22:27:05.000000000 +0100
++++ xorg-server-1.5.99.2/hw/dmx/glxProxy/glxvisuals.c 2008-12-03 10:26:28.231539217 +0100
+@@ -38,6 +38,11 @@
+ #include "glxutil.h"
+ #include "dmx_glxvisuals.h"
+
++#undef Xmalloc
++#undef Xcalloc
++#undef Xrealloc
++#undef Xfree
++
+ static int numConfigs = 0;
+ static __GLXvisualConfig *visualConfigs = NULL;
+ static void **visualPrivates = NULL;