diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files')
5 files changed, 181 insertions, 27 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file mode 100644 index 00000000..d44445fa --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -0,0 +1,111 @@ +From 8ab672ccc67b64058cffac2cd19a0d3b75d5aa25 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 + +time element is deprecated on new input_event structure in kernel's +input.h [1] + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f + +Upstream-Status: Submitted [https://github.com/LibVNC/x11vnc/pull/117] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/uinput.c | 28 ++++++++++++++++++++++++---- + 1 file changed, 24 insertions(+), 4 deletions(-) + +diff --git a/src/uinput.c b/src/uinput.c +index 28fbad3..343b7c5 100644 +--- a/src/uinput.c ++++ b/src/uinput.c +@@ -54,6 +54,11 @@ so, delete this exception statement from your version. + #include <linux/input.h> + #include <linux/uinput.h> + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + #if !defined(EV_SYN) || !defined(SYN_REPORT) + #undef UINPUT_OK + #endif +@@ -710,6 +715,7 @@ void parse_uinput_str(char *in) { + static void ptr_move(int dx, int dy) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tval; + int d = direct_rel_fd < 0 ? fd : direct_rel_fd; + + if (injectable && strchr(injectable, 'M') == NULL) { +@@ -720,7 +726,9 @@ static void ptr_move(int dx, int dy) { + + if (db) fprintf(stderr, "ptr_move(%d, %d) fd=%d\n", dx, dy, d); + +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tval, NULL); ++ ev.input_event_sec = tval.tv_sec; ++ ev.input_event_usec = tval.tv_usec; + ev.type = EV_REL; + ev.code = REL_Y; + ev.value = dy; +@@ -755,6 +763,7 @@ static void apply_tslib(int *x, int *y) { + static void ptr_abs(int x, int y, int p) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tval; + int x0, y0; + int d = direct_abs_fd < 0 ? fd : direct_abs_fd; + +@@ -773,7 +782,9 @@ static void ptr_abs(int x, int y, int p) { + + if (db) fprintf(stderr, "ptr_abs(%d, %d => %d %d, p=%d) fd=%d\n", x0, y0, x, y, p, d); + +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tval, NULL); ++ ev.input_event_sec = tval.tv_sec; ++ ev.input_event_usec = tval.tv_usec; + ev.type = EV_ABS; + ev.code = ABS_Y; + ev.value = y; +@@ -950,6 +961,7 @@ if (0) {usleep(100*1000) ;} + static void button_click(int down, int btn) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tval; + int d = direct_btn_fd < 0 ? fd : direct_btn_fd; + + if (injectable && strchr(injectable, 'B') == NULL) { +@@ -959,7 +971,12 @@ static void button_click(int down, int btn) { + if (db) fprintf(stderr, "button_click: btn %d %s fd=%d\n", btn, down ? "down" : "up", d); + + memset(&ev, 0, sizeof(ev)); +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tval, NULL); ++ gettimeofday(&tval, NULL); ++ ev.input_event_sec = tval.tv_sec; ++ ev.input_event_usec = tval.tv_usec; ++ ev.input_event_sec = tval.tv_sec; ++ ev.input_event_usec = tval.tv_usec; + ev.type = EV_KEY; + ev.value = down; + +@@ -1230,6 +1247,7 @@ void uinput_pointer_command(int mask, int x, int y, rfbClientPtr client) { + void uinput_key_command(int down, int keysym, rfbClientPtr client) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tval; + int scancode; + allowed_input_t input; + int d = direct_key_fd < 0 ? fd : direct_key_fd; +@@ -1253,7 +1271,9 @@ void uinput_key_command(int down, int keysym, rfbClientPtr client) { + if (db) fprintf(stderr, "uinput_key_command: %d -> %d %s fd=%d\n", keysym, scancode, down ? "down" : "up", d); + + memset(&ev, 0, sizeof(ev)); +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tval, NULL); ++ ev.input_event_sec = tval.tv_sec; ++ ev.input_event_usec = tval.tv_usec; + ev.type = EV_KEY; + ev.code = (unsigned char) scancode; + ev.value = down; diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch new file mode 100644 index 00000000..a15f3fe5 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch @@ -0,0 +1,37 @@ +From 686491573827b98ba031adaa5da373366079d3d8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Dagenais?= <jeff.dagenais@gmail.com> +Date: Mon, 11 Feb 2019 11:42:59 -0500 +Subject: [PATCH] misc/Makefile.am: don't install Xdummy when configured + --without-x + +Upstream-status: submitted https://github.com/jeff-dagenais/x11vnc/pull/1 + +Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> +--- + misc/Makefile.am | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/misc/Makefile.am b/misc/Makefile.am +index c0b98c8..e4a22c1 100644 +--- a/misc/Makefile.am ++++ b/misc/Makefile.am +@@ -18,7 +18,10 @@ EXTRA_DIST = \ + uinput.pl \ + ultravnc_repeater.pl \ + vcinject.pl \ +- x11vnc_loop \ ++ x11vnc_loop ++ ++if HAVE_X11 ++EXTRA_DIST += \ + Xdummy.c \ + Xdummy.in + +@@ -32,3 +35,4 @@ do_dummy_c_subst = $(SED) \ + Xdummy: $(srcdir)/Xdummy.in $(srcdir)/Xdummy.c + $(do_dummy_c_subst) < $< > $@.tmp + mv -f $@.tmp $@ ++endif +-- +2.17.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/endian-fix.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/endian-fix.patch deleted file mode 100644 index f2a538bf..00000000 --- a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/endian-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -libvncserver: replace LIBVNCSERVER_WORDS_BIGENDIAN with WORDS_BIGENDIAN - -since macro AC_C_BIGENDIAN is used in autoconf and WORDS_BIGENDIAN is -automatically set for different arch, it is better to use WORDS_BIGENDIAN -instead of LIBVNCSERVER_WORDS_BIGENDIAN, which cuase issue in mips. - -Signed-off-by: Yu Ke <ke.yu@intel.com> - -Upstream-Status: Pending - -diff --git a/libvncserver/main.c b/libvncserver/main.c -index b6bd930..8bbb7bf 100644 ---- a/libvncserver/main.c -+++ b/libvncserver/main.c -@@ -47,7 +47,7 @@ static MUTEX(extMutex); - - static int rfbEnableLogging=1; - --#ifdef LIBVNCSERVER_WORDS_BIGENDIAN -+#ifdef WORDS_BIGENDIAN - char rfbEndianTest = (1==0); - #else - char rfbEndianTest = (1==1); - diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch new file mode 100644 index 00000000..a571ba28 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch @@ -0,0 +1,30 @@ +From 95a10ab64c2dbbec2c8dad91a5ffb73a0d68474b Mon Sep 17 00:00:00 2001 +From: Jonathan Liu <net147@gmail.com> +Date: Mon, 16 Mar 2020 20:04:06 +1100 +Subject: [PATCH] src/cursor: fix xfc NULL pointer dereference + +xfc->width and xfc->height for the XFixes cursor image returned from +XFixesGetCursorImage(dpy) are accessed without first checking that xfc +is not NULL. This can result in the server sometimes crashing when +moving a Google Chrome window. + +Fixes: 37c946191a0f ("Broken cursor bugfix for 64 bit systems (#49)") +Upstream-Status: Accepted +Signed-off-by: Jonathan Liu <net147@gmail.com> +--- + src/cursor.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cursor.c b/src/cursor.c +index 39e73a6..74a08c6 100644 +--- a/src/cursor.c ++++ b/src/cursor.c +@@ -1311,7 +1311,7 @@ static int get_exact_cursor(int init) { + + /* retrieve the cursor info + pixels from server: */ + xfc = XFixesGetCursorImage(dpy); +- { ++ if (xfc) { + /* 2017-07-09, Stephan Fuhrmann: This fixes an implementation flaw for 64 bit systems. + * The XFixesCursorImage structure says xfc->pixels is (unsigned long*) in the structure, but + * the protocol spec says it's 32 bit per pixel diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/starting-fix.patch b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/starting-fix.patch index f62e405d..060319c7 100644 --- a/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/starting-fix.patch +++ b/external/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/starting-fix.patch @@ -10,10 +10,10 @@ Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Upstream-Status: Inappropriate [configuration] -Index: x11vnc-0.9.12/x11vnc/x11vnc.desktop +Index: x11vnc-0.9.12/x11vnc.desktop =================================================================== ---- x11vnc-0.9.12.orig/x11vnc/x11vnc.desktop 2011-03-03 10:33:18.000000000 +0800 -+++ x11vnc-0.9.12/x11vnc/x11vnc.desktop 2011-03-03 10:35:20.000000000 +0800 +--- x11vnc-0.9.12.orig/x11vnc.desktop 2011-03-03 10:33:18.000000000 +0800 ++++ x11vnc-0.9.12/x11vnc.desktop 2011-03-03 10:35:20.000000000 +0800 @@ -1,7 +1,7 @@ [Desktop Entry] Name=X11VNC Server |