+--- xf86-video-chips-1.2.6/src/compat-api.h~ 2015-09-26 18:28:01.000000000 +0200
++++ xf86-video-chips-1.2.6/src/compat-api.h 2016-11-28 09:12:37.337570460 +0100
+@@ -75,8 +75,13 @@
+
+ #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
+
++#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
++#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout
++#define BLOCKHANDLER_ARGS arg, pTimeout
++#else
+ #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
+ #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
++#endif
+
+ #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
+ #define CLOSE_SCREEN_ARGS pScreen
+
+From cfergeau at redhat.com Tue Aug 4 08:53:26 2015
+From: cfergeau at redhat.com (Christophe Fergeau)
+Date: Tue, 4 Aug 2015 17:53:26 +0200
+Subject: [Spice-devel] [qxl 2/2] Fix compilation with newer Xorg versions
+In-Reply-To: <1438703606-20259-1-git-send-email-cfergeau@redhat.com>
+References: <1438703606-20259-1-git-send-email-cfergeau@redhat.com>
+Message-ID: <1438703606-20259-2-git-send-email-cfergeau@redhat.com>
+
+Xorg 1.18 stopped exporting some xfont related symbols in its
+headers/shared libraries, which causes QXL to fail to build:
+
+uxa-damage.c:947:5: error: implicit declaration of function 'QueryGlyphExtents' [-Werror=implicit-function-declaration]
+ QueryGlyphExtents(font, charinfo, n, &extents);
+
+The missing definition can be found in xfont, so this commit addes the
+needed configure.ac checks and includes.
+Note that dixfontstr.h must be included before the xfont headers or this
+will cause compile-time warnings on older Xorg versions (eg 1.17)
+---
+ configure.ac | 2 +-
+ src/uxa/uxa-damage.c | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6555a8d..7e95b01 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -61,7 +61,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
+ XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto)
+
+ # Obtain compiler/linker options for the driver dependencies
+-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto $REQUIRED_MODULES)
++PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto xfont $REQUIRED_MODULES)
+
+
+ save_CFLAGS="$CFLAGS"
+diff --git a/src/uxa/uxa-damage.c b/src/uxa/uxa-damage.c
+index 6201712..a6d1ee3 100644
+--- a/src/uxa/uxa-damage.c
++++ b/src/uxa/uxa-damage.c
+@@ -33,6 +33,9 @@
+ #include <stdlib.h>
+ #include "uxa-priv.h"
+
+ #include <X11/X.h>
++#include <X11/fonts/font.h>
++#include <X11/fonts/fontstruct.h>
++#include <X11/fonts/fontutil.h>
+ #include "scrnintstr.h"
+ #include "windowstr.h"
+ #include "dixfontstr.h"
+--
+2.4.3
+