* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
110 lines
3.6 KiB
Diff
110 lines
3.6 KiB
Diff
From daecf59cc8b294265666482a4766aaa3148c308b 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
|
|
|
|
[Retrieved from:
|
|
https://github.com/LibVNC/x11vnc/commit/daecf59cc8b294265666482a4766aaa3148c308b]
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
---
|
|
src/uinput.c | 25 +++++++++++++++++++++----
|
|
1 file changed, 21 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/uinput.c b/src/uinput.c
|
|
index 28fbad3..d71bcde 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,9 @@ 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);
|
|
+ ev.input_event_sec = tval.tv_sec;
|
|
+ ev.input_event_usec = tval.tv_usec;
|
|
ev.type = EV_KEY;
|
|
ev.value = down;
|
|
|
|
@@ -1230,6 +1244,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 +1268,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;
|