aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics/x11vnc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-11-30 11:49:21 -0800
committerKhem Raj <raj.khem@gmail.com>2019-12-01 11:24:26 -0800
commitaa86b55286e74e5a6d779a14c526561a091cd21e (patch)
tree8a74cda79b518010f206282e25a44d1d7f624e2f /meta-oe/recipes-graphics/x11vnc
parent18805e625b1da4964864bc9f0b165635e814edd8 (diff)
downloadmeta-openembedded-contrib-aa86b55286e74e5a6d779a14c526561a091cd21e.tar.gz
x11vnc: Fix build for 32bit arches with 64bit time_t
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics/x11vnc')
-rw-r--r--meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch111
-rw-r--r--meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb5
2 files changed, 114 insertions, 2 deletions
diff --git a/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-graphics/x11vnc/files/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 0000000000..d44445fa9f
--- /dev/null
+++ b/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/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb b/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
index d0c9f774fe..0d84c420a1 100644
--- a/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
+++ b/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
@@ -10,8 +10,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
SRCREV = "4ca006fed80410bd9b061a1519bd5d9366bb0bc8"
SRC_URI = "git://github.com/LibVNC/x11vnc \
file://starting-fix.patch \
- file://0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch \
-"
+ file://0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch \
+ file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
+ "
S = "${WORKDIR}/git"
DEPENDS = "\