src/via_display.c |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 8bc53d8adad4b8f384bfa6b7fc25319ddf2c2681
Author: Kevin Brace <kevinbr...@gmx.com>
Date:   Tue Feb 16 13:46:41 2016 -0800

    Compilation hooks to support ClockRange and ClockRanges
    
    When compiling OpenChrome for Ubuntu 10.04 LTS, it was discovered that
    x.org xserver discontinued the use of a structure with ClockRanges type
    within ScrnInfoRec. XORG_VERSION_NUMERIC will now be used to figure out
    which version of xserver the compiler is compiling against. Now
    OpenChrome can be compiled against Ubuntu 10.04 LTS without warnings or
    errors.
    
    Signed-off-by: Kevin Brace <kevinbr...@gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 7e58ae5..be1bebe 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -1670,7 +1670,11 @@ UMSCrtcInit(ScrnInfoPtr pScrn)
     drmmode_crtc_private_ptr iga1_rec = NULL, iga2_rec = NULL;
     vgaHWPtr hwp = VGAHWPTR(pScrn);
     VIAPtr pVia = VIAPTR(pScrn);
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,8,0,0,0)
     ClockRangePtr clockRanges;
+#else
+    ClockRangesPtr clockRanges;
+#endif
     int max_pitch, max_height;
     VIABIOSInfoPtr pBIOSInfo;
     xf86CrtcPtr iga1, iga2;
@@ -1734,7 +1738,12 @@ UMSCrtcInit(ScrnInfoPtr pScrn)
      * Set up ClockRanges, which describe what clock ranges are
      * available, and what sort of modes they can be used for.
      */
+
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,8,0,0,0)
     clockRanges = xnfalloc(sizeof(ClockRange));
+#else
+    clockRanges = xnfalloc(sizeof(ClockRanges));
+#endif
     clockRanges->next = NULL;
     clockRanges->minClock = 20000;
     clockRanges->maxClock = 230000;
_______________________________________________
Openchrome-devel mailing list
Openchrome-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/openchrome-devel

Reply via email to