From patchwork Sun Dec 1 18:46:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 180547 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4275929ile; Sun, 1 Dec 2019 10:47:56 -0800 (PST) X-Google-Smtp-Source: APXvYqzLzGJrNWfr7HeE3BaNWw4mcq+WmPAqYBJA7DTK6SQl/BcFcCfx3Y4pxFb7tNEyWkAFngvV X-Received: by 2002:a17:902:322:: with SMTP id 31mr24025740pld.244.1575226076322; Sun, 01 Dec 2019 10:47:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575226076; cv=none; d=google.com; s=arc-20160816; b=ACZe9wT4s1R5A6N9XoqTcPMlLNicPCKibE8R2k508W+5VZIUapqHlUOCWhLPcMsTZR qp15mZPEB105zrcxdeGuj6VgTtLjjJWR6XjCXc3uSABixdq3ZxdYx3evyZdP47xcUXBi 6qO8NmjlD6XXR2OVJFHabd+FohpkvqcAGbzXdLT85ZuvVILoeCFZUdFkIfUr9s03o25+ zCNzooTACNalc4O8p11OXKEixT1ivwgpN9geslkPap69YjIX/kxrtWQpJ2eRLyoao+WM 2pEnq74BQV9WGmjP3l9WtJm8SlcyG8et7s/7+br75u8/mjcBi20P4b6v1hj6DbriwhyH TUXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=GmY9Be0MztX1rP/1N0Y8mWUfGGElB/mBMp6l34jDtv8=; b=UaO5IR65dMmdJdjGkyj67apTlNmUdyNzCrRxsxN8Kckl3DtZ1O2lO37kFvXKDQeBYD PPF28S/oE3bzhZLPFmHY3RAw7SI19+7E54K2C7vy7254zvBiaYUvORkC++Y6SN1DJg4k TOYqle/9VyUQ8gklWS/i/tHCZuVBcGec8scxo9TbebUVlsjKLwHM/eTD739E4QZtnSe/ 1d8Qifp+P5br3HuqlNQ9jSpFQQiALUgauQTLyaB1sWXmeVy/K1Rgm6r4IC1lt900I9sU tZ2ZUVPdkwUtsPNcdz/J+Q0NQBW6wON0btKAkD9x9FGEv7cT4mAinFESlkedLCP/IvkL X6ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cqEEzbRR; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id i11si27198829pgk.349.2019.12.01.10.47.56; Sun, 01 Dec 2019 10:47:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cqEEzbRR; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 437607F7A4; Sun, 1 Dec 2019 18:47:31 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by mail.openembedded.org (Postfix) with ESMTP id A93567F523 for ; Sun, 1 Dec 2019 18:46:38 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id s35so2539059pjb.7 for ; Sun, 01 Dec 2019 10:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZMMJieexwPOIayp9duUYA4KhYnHf79vUc2RRS0fsbck=; b=cqEEzbRRbVRjehiTvEELkYJhyJJqPjw8LOc/jL3deQ8/wFTJVnEf/tCduzfdmk5LbS yZ+4cT2LYvWsFnR/HFqjNxylc0Hvnk9z3l88KFOr5alIhCExE3idUz8oHnGykho1fcGE 0Gr8C/QvucbI7CRgMtueZQk/ArYE2bftkrZwu0ciTqSX2Kp31mObbwS+YSsLiO9FGpNL l+n2QCLYxF8oTN9WBP3Hys1M3XmMxQyny/hbm/fLf6viL0x60AplABnRqMlneaQQzkXh jhUt54V+/kF5Ze/LXKtb5BmVz2Q7HNCseikhCIf4iXgJ9Tr1apUTU9Flk+jQ9uTMMjkh MYiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZMMJieexwPOIayp9duUYA4KhYnHf79vUc2RRS0fsbck=; b=XzIqWkhBaJr+KXoRkdKDD7IMmsiXxAnVz+hDpb32ESXT5/wZQcxnuRn+TrJP7+TAPm wUarzAPfwqd9qh1qZKrEwW9pno7ffN4ZVidtZijs/DF9zAKi+TvKFiXYyThqWDRgiXt/ +RD8v0yUjKzZZNfuzGQtRlGqGWzM/KOCh+O8GF5CuGJR+BSFO+HMHwHLMq/1Mwvw4gDe yQ1fYm2eyzxYy0LlWIsPtJbkc/rniXy2lEZWxZTejsN1pi9UmAnXP9brqqTG+Tnboonr x4sCObDvwYXBzKzbOxJ47G+IvhH0O/rU53QKPxT8CPYknAiO4OrcESWnBcrVr9Lno9+G 1+Eg== X-Gm-Message-State: APjAAAU2ApLe7sOxGaoYfZZYhCjH5UrKYaQtbEoPREdJJChC2ZGNJ1Yc pAsYYKoNNUsmmBiytau0uSK/XMcTnX4= X-Received: by 2002:a17:90b:24c:: with SMTP id fz12mr30381064pjb.51.1575225999274; Sun, 01 Dec 2019 10:46:39 -0800 (PST) Received: from apollo.localdomain ([2601:646:8500:1c20:55f2:e19b:8d5e:a884]) by smtp.gmail.com with ESMTPSA id y24sm33916800pfr.116.2019.12.01.10.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Dec 2019 10:46:38 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Sun, 1 Dec 2019 10:46:19 -0800 Message-Id: <20191201184622.889513-6-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191201184622.889513-1-raj.khem@gmail.com> References: <20191201184622.889513-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH 6/9] tslib: Fix build for 32bit arches with 64bit time_t X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...ld-on-32bit-arches-with-64bit-time_t.patch | 389 ++++++++++++++++++ meta-oe/recipes-graphics/tslib/tslib_1.21.bb | 1 + 2 files changed, 390 insertions(+) create mode 100644 meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch -- 2.24.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file mode 100644 index 0000000000..59bd97a0f2 --- /dev/null +++ b/meta-oe/recipes-graphics/tslib/tslib/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -0,0 +1,389 @@ +From 5455055660700be18eb8800e56e2423031ed4c76 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 30 Nov 2019 19:59:29 -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/libts/tslib/pull/162] + +Signed-off-by: Khem Raj +--- + plugins/input-raw.c | 59 +++++++++++++++++++++++++++------------- + tools/ts_uinput.c | 66 ++++++++++++++++++++++++++++++--------------- + 2 files changed, 85 insertions(+), 40 deletions(-) + +diff --git a/plugins/input-raw.c b/plugins/input-raw.c +index 64f0156..f030836 100644 +--- a/plugins/input-raw.c ++++ b/plugins/input-raw.c +@@ -40,6 +40,11 @@ + # include + #endif + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + #ifndef EV_SYN /* 2.4 kernel headers */ + # define EV_SYN 0x00 + #endif +@@ -384,7 +389,8 @@ static int ts_input_read(struct tslib_module_info *inf, + samp->y = i->current_y; + samp->pressure = i->current_p; + } +- samp->tv = ev.time; ++ samp->tv.tv_sec = ev.input_event_sec; ++ samp->tv.tv_usec = ev.input_event_usec; + #ifdef DEBUG + fprintf(stderr, + "RAW---------------------> %d %d %d %ld.%ld\n", +@@ -519,7 +525,8 @@ static int ts_input_read(struct tslib_module_info *inf, + samp->pressure = i->current_p = ev.value; + break; + } +- samp->tv = ev.time; ++ samp->tv.tv_sec = ev.input_event_sec; ++ samp->tv.tv_usec = ev.input_event_usec; + #ifdef DEBUG + fprintf(stderr, + "RAW---------------------------> %d %d %d\n", +@@ -536,7 +543,8 @@ static int ts_input_read(struct tslib_module_info *inf, + samp->x = 0; + samp->y = 0; + samp->pressure = 0; +- samp->tv = ev.time; ++ samp->tv.tv_sec = ev.input_event_sec; ++ samp->tv.tv_usec = ev.input_event_usec; + samp++; + total++; + } +@@ -651,7 +659,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf, + switch (i->ev[it].code) { + case BTN_TOUCH: + i->buf[total][i->slot].pen_down = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + if (i->ev[it].value == 0) + pen_up = 1; +@@ -751,7 +760,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf, + // fall through + case ABS_MT_POSITION_X: + i->buf[total][i->slot].x = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + break; + case ABS_Y: +@@ -760,7 +770,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf, + // fall through + case ABS_MT_POSITION_Y: + i->buf[total][i->slot].y = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + break; + case ABS_PRESSURE: +@@ -769,12 +780,14 @@ static int ts_input_read_mt(struct tslib_module_info *inf, + // fall through + case ABS_MT_PRESSURE: + i->buf[total][i->slot].pressure = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + break; + case ABS_MT_TOOL_X: + i->buf[total][i->slot].tool_x = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + /* for future use + * i->buf[total][i->slot].valid |= TSLIB_MT_VALID_TOOL; +@@ -782,7 +795,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf, + break; + case ABS_MT_TOOL_Y: + i->buf[total][i->slot].tool_y = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + /* for future use + * i->buf[total][i->slot].valid |= TSLIB_MT_VALID_TOOL; +@@ -790,7 +804,8 @@ static int ts_input_read_mt(struct tslib_module_info *inf, + break; + case ABS_MT_TOOL_TYPE: + i->buf[total][i->slot].tool_type = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + /* for future use + * i->buf[total][i->slot].valid |= TSLIB_MT_VALID_TOOL; +@@ -798,12 +813,14 @@ static int ts_input_read_mt(struct tslib_module_info *inf, + break; + case ABS_MT_ORIENTATION: + i->buf[total][i->slot].orientation = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + break; + case ABS_MT_DISTANCE: + i->buf[total][i->slot].distance = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + + if (i->special_device == EGALAX_VERSION_210) { +@@ -816,34 +833,40 @@ static int ts_input_read_mt(struct tslib_module_info *inf, + break; + case ABS_MT_BLOB_ID: + i->buf[total][i->slot].blob_id = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + break; + case ABS_MT_TOUCH_MAJOR: + i->buf[total][i->slot].touch_major = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + if (i->ev[it].value == 0) + i->buf[total][i->slot].pressure = 0; + break; + case ABS_MT_WIDTH_MAJOR: + i->buf[total][i->slot].width_major = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + break; + case ABS_MT_TOUCH_MINOR: + i->buf[total][i->slot].touch_minor = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + break; + case ABS_MT_WIDTH_MINOR: + i->buf[total][i->slot].width_minor = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + break; + case ABS_MT_TRACKING_ID: + i->buf[total][i->slot].tracking_id = i->ev[it].value; +- i->buf[total][i->slot].tv = i->ev[it].time; ++ i->buf[total][i->slot].tv.tv_sec = i->ev[it].input_event_sec; ++ i->buf[total][i->slot].tv.tv_usec = i->ev[it].input_event_usec; + i->buf[total][i->slot].valid |= TSLIB_MT_VALID; + if (i->ev[it].value == -1) + i->buf[total][i->slot].pressure = 0; +diff --git a/tools/ts_uinput.c b/tools/ts_uinput.c +index 6ca4c3d..1832a07 100644 +--- a/tools/ts_uinput.c ++++ b/tools/ts_uinput.c +@@ -170,14 +170,16 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s, + continue; + + if (s[j][i].pen_down == 1) { +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_KEY; + data->ev[c].code = BTN_TOUCH; + data->ev[c].value = s[j][i].pen_down; + c++; + } + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_SLOT; + data->ev[c].value = s[j][i].slot; +@@ -190,111 +192,129 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s, + * we should use slot 1 and so on. + */ + if (i == 0) { +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_X; + data->ev[c].value = s[j][i].x; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_Y; + data->ev[c].value = s[j][i].y; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_PRESSURE; + data->ev[c].value = s[j][i].pressure; + c++; + } + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_POSITION_X; + data->ev[c].value = s[j][i].x; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_POSITION_Y; + data->ev[c].value = s[j][i].y; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_PRESSURE; + data->ev[c].value = s[j][i].pressure; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_TOUCH_MAJOR; + data->ev[c].value = s[j][i].touch_major; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_WIDTH_MAJOR; + data->ev[c].value = s[j][i].width_major; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_TOUCH_MINOR; + data->ev[c].value = s[j][i].touch_minor; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_WIDTH_MINOR; + data->ev[c].value = s[j][i].width_minor; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_TOOL_TYPE; + data->ev[c].value = s[j][i].tool_type; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_TOOL_X; + data->ev[c].value = s[j][i].tool_x; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_TOOL_Y; + data->ev[c].value = s[j][i].tool_y; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_ORIENTATION; + data->ev[c].value = s[j][i].orientation; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_DISTANCE; + data->ev[c].value = s[j][i].distance; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_BLOB_ID; + data->ev[c].value = s[j][i].blob_id; + c++; + +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_ABS; + data->ev[c].code = ABS_MT_TRACKING_ID; + data->ev[c].value = s[j][i].tracking_id; + c++; + + if (data->mt_type_a == 1) { +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_SYN; + data->ev[c].code = SYN_MT_REPORT; + data->ev[c].value = 0; +@@ -302,7 +322,8 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s, + } + + if (s[j][i].pen_down == 0) { +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_KEY; + data->ev[c].code = BTN_TOUCH; + data->ev[c].value = s[j][i].pen_down; +@@ -312,7 +333,8 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s, + } + + if (c > 0) { +- data->ev[c].time = s[j][i].tv; ++ data->ev[c].input_event_sec = s[j][i].tv.tv_sec; ++ data->ev[c].input_event_usec = s[j][i].tv.tv_usec; + data->ev[c].type = EV_SYN; + data->ev[c].code = SYN_REPORT; + data->ev[c].value = 0; +-- +2.24.0 + diff --git a/meta-oe/recipes-graphics/tslib/tslib_1.21.bb b/meta-oe/recipes-graphics/tslib/tslib_1.21.bb index 2bc40d9391..bb28ee410c 100644 --- a/meta-oe/recipes-graphics/tslib/tslib_1.21.bb +++ b/meta-oe/recipes-graphics/tslib/tslib_1.21.bb @@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "\ " SRC_URI = "https://github.com/kergoth/tslib/releases/download/${PV}/tslib-${PV}.tar.xz;downloadfilename=tslib-${PV}.tar.xz \ + file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ file://ts.conf \ file://tslib.sh \ "