From 792584fa740dbc81b72fd4f4bdf27d65b9c046cf Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 28 May 2014 14:00:26 +0100 Subject: [PATCH] sna/dri2: Reorder declarations to compile on old Xorg Signed-off-by: Chris Wilson --- src/sna/sna_dri2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index cff97372..72f34d6a 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -51,6 +51,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include #endif +#if DRI2INFOREC_VERSION < 2 +#error DRI2 version supported by the Xserver is too old +#endif + static inline struct kgem_bo *ref(struct kgem_bo *bo) { assert(bo->refcnt); @@ -78,6 +82,7 @@ get_private(void *buffer) return (struct sna_dri2_private *)((DRI2Buffer2Ptr)buffer+1); } +#if DRI2INFOREC_VERSION >= 4 enum frame_event_type { WAITMSC = 0, SWAP, @@ -206,9 +211,6 @@ sna_dri2_window_get_chain(WindowPtr win) assert(priv != NULL); return priv->chain; } - -#if DRI2INFOREC_VERSION < 2 -#error DRI2 version supported by the Xserver is too old #endif #if DRI2INFOREC_VERSION < 6