[tigervnc/f22: 3/3] Allow build against xorg-x11-server-1.17.

Tim Waugh twaugh at fedoraproject.org
Fri Feb 13 17:48:56 UTC 2015


commit 63c07f136e6962b371e547640ad5bd4a842ed42a
Author: Tim Waugh <twaugh at redhat.com>
Date:   Fri Feb 13 17:18:53 2015 +0000

    Allow build against xorg-x11-server-1.17.

 tigervnc-xserver117.patch |   44 ++++++++++++++++++++++++++++++++++++++++++++
 tigervnc.spec             |    5 +++++
 2 files changed, 49 insertions(+), 0 deletions(-)
---
diff --git a/tigervnc-xserver117.patch b/tigervnc-xserver117.patch
new file mode 100644
index 0000000..c5dd67b
--- /dev/null
+++ b/tigervnc-xserver117.patch
@@ -0,0 +1,44 @@
+diff -up tigervnc-1.4.2/unix/xserver/hw/vnc/xorg-version.h.xserver117 tigervnc-1.4.2/unix/xserver/hw/vnc/xorg-version.h
+--- tigervnc-1.4.2/unix/xserver/hw/vnc/xorg-version.h.xserver117	2015-01-23 23:37:23.000000000 +0000
++++ tigervnc-1.4.2/unix/xserver/hw/vnc/xorg-version.h	2015-02-13 17:35:29.847294663 +0000
+@@ -48,8 +48,10 @@
+ #define XORG 115
+ #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (16 * 100000) + (99 * 1000))
+ #define XORG 116
++#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (17 * 100000) + (99 * 1000))
++#define XORG 117
+ #else
+-#error "X.Org newer than 1.16 is not supported"
++#error "X.Org newer than 1.17 is not supported"
+ #endif
+ 
+ #endif
+diff -up tigervnc-1.4.2/unix/xserver/hw/vnc/xvnc.cc.xserver117 tigervnc-1.4.2/unix/xserver/hw/vnc/xvnc.cc
+--- tigervnc-1.4.2/unix/xserver/hw/vnc/xvnc.cc.xserver117	2015-01-23 23:37:23.000000000 +0000
++++ tigervnc-1.4.2/unix/xserver/hw/vnc/xvnc.cc	2015-02-13 17:35:27.963265774 +0000
+@@ -717,9 +717,9 @@ vfbInstallColormap(ColormapPtr pmap)
+ 	entries = pmap->pVisual->ColormapEntries;
+ 	pVisual = pmap->pVisual;
+ 
+-	ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
+-	prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
+-	defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
++	ppix = (Pixel *)malloc(entries * sizeof(Pixel));
++	prgb = (xrgb *)malloc(entries * sizeof(xrgb));
++	defs = (xColorItem *)malloc(entries * sizeof(xColorItem));
+ 
+ 	for (i = 0; i < entries; i++)  ppix[i] = i;
+ 	/* XXX truecolor */
+@@ -738,9 +738,9 @@ vfbInstallColormap(ColormapPtr pmap)
+ 	}
+ 	(*pmap->pScreen->StoreColors)(pmap, entries, defs);
+ 	
+-	xfree(ppix);
+-	xfree(prgb);
+-	xfree(defs);
++	free(ppix);
++	free(prgb);
++	free(defs);
+     }
+ }
+ 
diff --git a/tigervnc.spec b/tigervnc.spec
index 197067f..8296efa 100644
--- a/tigervnc.spec
+++ b/tigervnc.spec
@@ -52,6 +52,7 @@ Patch8:		tigervnc-getmaster.patch
 Patch9:		tigervnc-shebang.patch
 Patch11:	tigervnc-format-security.patch
 Patch14:	tigervnc-xstartup.patch
+Patch15:	tigervnc-xserver117.patch
 
 # This is tigervnc-%{version}/unix/xserver116.patch rebased on the latest xorg
 Patch100:       tigervnc-xserver116-rebased.patch
@@ -181,6 +182,9 @@ popd
 # Clearer xstartup file (bug #923655).
 %patch14 -p1 -b .xstartup
 
+# Allow build against xorg-x11-server-1.17.
+%patch15 -p1 -b .xserver117
+
 %build
 %ifarch sparcv9 sparc64 s390 s390x
 export CFLAGS="$RPM_OPT_FLAGS -fPIC"
@@ -353,6 +357,7 @@ fi
 %changelog
 * Fri Feb 13 2015 Tim Waugh <twaugh at redhat.com> - 1.4.2-1
 - Rebased xserver116.patch against xorg-x11-server-1.17.1.
+- Allow build against xorg-x11-server-1.17.
 - 1.4.2.
 
 * Tue Sep  9 2014 Tim Waugh <twaugh at redhat.com> - 1.3.1-11


More information about the scm-commits mailing list