[Spice-devel] [xf86-video-qxl] Provide compatibility for Xorg list code with Xorg < 1.12, for RHEL 6 support

Jeremy White jwhite at codeweavers.com
Thu May 23 07:24:22 PDT 2013


Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
 src/qxl.h     |   12 +++++++++++-
 src/qxl_kms.c |    2 +-
 src/qxl_mem.c |    2 +-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/qxl.h b/src/qxl.h
index b71bca6..c79a63a 100644
--- a/src/qxl.h
+++ b/src/qxl.h
@@ -56,6 +56,16 @@
 
 #include "qxl_drmmode.h"
 
+#if (XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 11, 99, 903, 0))
+typedef struct list xorg_list_t;
+#define xorg_list_init              list_init
+#define xorg_list_add               list_add
+#define xorg_list_del               list_del
+#define xorg_list_for_each_entry    list_for_each_entry
+#else
+typedef struct xorg_list xorg_list_t;
+#endif
+
 #include "compat-api.h"
 #define hidden _X_HIDDEN
 
@@ -332,7 +342,7 @@ struct _qxl_screen_t
 #endif /* XSPICE */
 
     uint32_t deferred_fps;
-    struct xorg_list ums_bos;
+    xorg_list_t ums_bos;
     struct qxl_bo_funcs *bo_funcs;
 
     Bool kms_enabled;
diff --git a/src/qxl_kms.c b/src/qxl_kms.c
index b673294..28979f2 100644
--- a/src/qxl_kms.c
+++ b/src/qxl_kms.c
@@ -338,7 +338,7 @@ struct qxl_kms_bo {
     const char *name;
     uint32_t size;
     int type;
-    struct xorg_list bos;
+    xorg_list_t bos;
     void *mapping;
     qxl_screen_t *qxl;
     int refcnt;
diff --git a/src/qxl_mem.c b/src/qxl_mem.c
index 44be8c4..fde0976 100644
--- a/src/qxl_mem.c
+++ b/src/qxl_mem.c
@@ -448,7 +448,7 @@ struct qxl_ums_bo {
     void *internal_virt_addr;
     int refcnt;
     qxl_screen_t *qxl;
-    struct xorg_list bos;
+    xorg_list_t bos;
 };
 
 static struct qxl_bo *qxl_bo_alloc_internal(qxl_screen_t *qxl, int type, int flags, unsigned long size, const char *name)
-- 
1.7.10.4




More information about the Spice-devel mailing list