Merge branch 'oldserver' of https://github.com/clbr/tigervnc
diff --git a/unix/xserver/hw/vnc/Input.c b/unix/xserver/hw/vnc/Input.c
index a50f33a..5c458f5 100644
--- a/unix/xserver/hw/vnc/Input.c
+++ b/unix/xserver/hw/vnc/Input.c
@@ -139,6 +139,22 @@
 	vncPrepareInputDevices();
 }
 
+#if XORG < 111
+static void enqueueEvents(DeviceIntPtr dev, int n)
+{
+	int i;
+
+	for (i = 0; i < n; i++) {
+		/*
+		 * Passing arguments in global variable eventq is probably not
+		 * good programming practise but in this case it is safe and
+		 * clear.
+		 */
+		mieqEnqueue(dev, (InternalEvent *) (eventq + i)->event);
+	}
+}
+#endif /* XORG < 111 */
+
 void vncPointerButtonAction(int buttonMask)
 {
 	int i;
@@ -226,22 +242,6 @@
 	*y = cursorPosY;
 }
 
-#if XORG < 111
-static void enqueueEvents(DeviceIntPtr dev, int n)
-{
-	int i;
-
-	for (i = 0; i < n; i++) {
-		/*
-		 * Passing arguments in global variable eventq is probably not
-		 * good programming practise but in this case it is safe and
-		 * clear.
-		 */
-		mieqEnqueue(dev, (InternalEvent *) (eventq + i)->event);
-	}
-}
-#endif /* XORG < 111 */
-
 static int vncPointerProc(DeviceIntPtr pDevice, int onoff)
 {
 	BYTE map[BUTTONS + 1];
diff --git a/unix/xserver/hw/vnc/InputXKB.c b/unix/xserver/hw/vnc/InputXKB.c
index a9bd11d..50a2130 100644
--- a/unix/xserver/hw/vnc/InputXKB.c
+++ b/unix/xserver/hw/vnc/InputXKB.c
@@ -43,8 +43,12 @@
 #endif
 
 #if XORG < 118
+#if XORG < 110
+#define GetMaster(dev, type) ((dev)->u.master)
+#else
 #define GetMaster(dev, type) ((dev)->master)
 #endif
+#endif
 
 extern DeviceIntPtr vncKeyboardDev;