Przeglądaj źródła

package/x11vnc: add and rework compile patches

Add the "Upstream" field to the patch message for:
 - 0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
 - 0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch

Add a compile patch for GCC >= 10 which enables -fno-common by default.

Fixes:
 - https://autobuild.buildroot.org/results/b2231fe06fe56036a5ddbe61cb8556b046e3a7b7
 - https://autobuild.buildroot.org/results/8afbcc63818d3e1586731e178f16635e773d5600
 - ...

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
[Julien: simplified autobuild URLs]
Signed-off-by: Julien Olivain <ju.o@free.fr>
Thomas Devoogdt 9 miesięcy temu
rodzic
commit
e5bb457d5d

+ 0 - 2
.checkpackageignore

@@ -1351,8 +1351,6 @@ package/x11r7/xdriver_xf86-video-nouveau/0001-nouveau-fixup-driver-for-new-X-ser
 package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch lib_patch.Upstream
 package/x11r7/xserver_xorg-server/0001-include-misc.h-fix-uClibc-build.patch lib_patch.Upstream
 package/x11r7/xserver_xorg-server/S40xorg Shellcheck lib_sysv.Variables
-package/x11vnc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch lib_patch.Upstream
-package/x11vnc/0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch lib_patch.Upstream
 package/xen/0001-9pfs-include-linux-limits.h-for-XATTR_SIZE_MAX.patch lib_patch.Upstream
 package/xen/0002-Fix-build-with-64-bits-time_t.patch lib_patch.Upstream
 package/xen/0003-libs-light-fix-tv_sec-printf-format.patch lib_patch.Upstream

+ 5 - 3
package/x11vnc/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch

@@ -1,4 +1,4 @@
-From daecf59cc8b294265666482a4766aaa3148c308b Mon Sep 17 00:00:00 2001
+From 8ca0465fda181bd20e5d30c36fb2aea56ed27b6b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 30 Nov 2019 11:43:32 -0800
 Subject: [PATCH] Fix build on 32bit arches with 64bit time_t
@@ -8,8 +8,7 @@ input.h [1]
 
 [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
 
-[Retrieved from:
-https://github.com/LibVNC/x11vnc/commit/daecf59cc8b294265666482a4766aaa3148c308b]
+Upstream: https://github.com/LibVNC/x11vnc/commit/daecf59cc8b294265666482a4766aaa3148c308b
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 ---
  src/uinput.c | 25 +++++++++++++++++++++----
@@ -107,3 +106,6 @@ index 28fbad3..d71bcde 100644
  	ev.type = EV_KEY;
  	ev.code = (unsigned char) scancode;
  	ev.value = down;
+-- 
+2.43.0
+

+ 5 - 3
package/x11vnc/0002-scan-limit-access-to-shared-memory-segments-to-current-user.patch → package/x11vnc/0002-scan-limit-access-to-shared-memory-segments-to-curre.patch

@@ -1,10 +1,9 @@
-From 69eeb9f7baa14ca03b16c9de821f9876def7a36a Mon Sep 17 00:00:00 2001
+From 3870280eca9c10a3607440209e9caf6d7749e379 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Gu=C3=A9nal=20DAVALAN?= <guenal.davalan@uca.fr>
 Date: Wed, 18 Nov 2020 08:40:45 +0100
 Subject: [PATCH] scan: limit access to shared memory segments to current user
 
-[Retrieved from:
-https://github.com/LibVNC/x11vnc/commit/69eeb9f7baa14ca03b16c9de821f9876def7a36a]
+Upstream: https://github.com/LibVNC/x11vnc/commit/69eeb9f7baa14ca03b16c9de821f9876def7a36a
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 ---
  src/scan.c | 2 +-
@@ -23,3 +22,6 @@ index 43e00d2..12994d5 100644
  
  	if (shm->shmid == -1) {
  		rfbErr("shmget(%s) failed.\n", name);
+-- 
+2.43.0
+

+ 48 - 0
package/x11vnc/0003-Fix-build-with-fno-common.patch

@@ -0,0 +1,48 @@
+From 08d57adf499264fcd32461a4092cd799c474d669 Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Tue, 28 Jan 2020 22:21:01 +0300
+Subject: [PATCH] Fix build with -fno-common
+
+GCC 10 defaults to -fno-common
+
+Upstream: https://github.com/LibVNC/x11vnc/commit/a48b0b1cd887d7f3ae67f525d7d334bd2feffe60
+Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
+---
+ src/util.c | 3 +++
+ src/util.h | 6 +++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/util.c b/src/util.c
+index a82a1a4..6a52ebf 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -47,6 +47,9 @@ int hxl = 0;
+ #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
+ MUTEX(x11Mutex);
+ MUTEX(scrollMutex);
++MUTEX(clientMutex);
++MUTEX(inputMutex);
++MUTEX(pointerMutex);
+ #endif
+ 
+ int nfix(int i, int n);
+diff --git a/src/util.h b/src/util.h
+index 35c1afd..99b5dd1 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -102,9 +102,9 @@ extern struct timeval _mysleep;
+ #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
+ extern MUTEX(x11Mutex);
+ extern MUTEX(scrollMutex);
+-MUTEX(clientMutex);
+-MUTEX(inputMutex);
+-MUTEX(pointerMutex);
++extern MUTEX(clientMutex);
++extern MUTEX(inputMutex);
++extern MUTEX(pointerMutex);
+ #endif
+ 
+ #define X_INIT INIT_MUTEX(x11Mutex)
+-- 
+2.43.0
+