From patchwork Mon Nov 25 08:44:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 180144 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp2854867ilf; Mon, 25 Nov 2019 00:45:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyOBvuwnsh2qD9cSHSiV/EmLsFgQ9zpOeRhT+rDSIk5Z0e/wT6QCtc6hKtAiAYQPOLIvtkk X-Received: by 2002:a17:902:b58b:: with SMTP id a11mr27288452pls.175.1574671550649; Mon, 25 Nov 2019 00:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574671550; cv=none; d=google.com; s=arc-20160816; b=TLBfN9wjWOPQQBAMbZDD4yNPw8hEPGgGAWtvyblj5aoFa16UqCP5kdwkIaVHQeLcLK TmNrFc9x/7inGbhO38qWmE2S3tzOa2zZAY5ombhp8zW0JLGU/5VaWBxvFXNujOO4lU1/ 4Fir1HNXGGiXSkQ+7iktSsr4by6ixj1dMpjb5Au56mKVp55Rkw+dmo5b6QwFivSFvQhq MuW2+1x75u+TU446QUOc9Kk2G65KiWakSDEzBrAhvMmCMI//IOd+BLKPsvsKhogQhCBH H2gqE9zQpN4rVIqCnDlwUMLbhu1Olv0+Qtz6uUosH4mK37PmvmzH8qB429kHZclYeVEf yk2Q== 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=80199p03EHWLey9Q6BLc+PvEINGCe9ohcHKIX/RGXbk=; b=bybT9hBRVveqFRXJOwmtf6pSxLmI6P0sL56lUsZl+HrDVivX594tYwL3UQXkWJj+Fo G9ux9dsNjoBV5c52teJyih+Td58xS9p+G2KWtIOinJwwrvF1vZP0YWfyRfdsxx/ednMU lx+bW6twEYYfg9gKOFwYt6ZCyX4TWBnMUo29YHSX0Fj3TmbZVGCznUb7jxydoxowq3BZ arMhE+8qSB2F56yRNABK0imAXkihTIR2v6jpK4iXzMXBmsLj8WfgIj6WBgubD96J+7cU Ic+cP029uOf2q6RYwNdd45qPmR/Mz9iOx0RE2ffwPKeV3hc+WU+eWPnuxCX9ZufSQZgT 8aBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Sd9AAIFy; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-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 68si7153411pge.220.2019.11.25.00.45.50; Mon, 25 Nov 2019 00:45:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-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=Sd9AAIFy; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-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 AD6E27FC83; Mon, 25 Nov 2019 08:45:43 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by mail.openembedded.org (Postfix) with ESMTP id E64376A441 for ; Mon, 25 Nov 2019 08:45:16 +0000 (UTC) Received: by mail-pj1-f65.google.com with SMTP id s8so6284783pji.2 for ; Mon, 25 Nov 2019 00:45:18 -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=s8Yn+KN2laV4GujjeaSFpvohUKhNZDFIBSN6YLJB5IY=; b=Sd9AAIFy6ico3w+gMfqzY7i9+8d/sMT3vRVM5Xoz8Lj+Py9PJOZ1L0Kw3fI/UIBYs/ gu2Ol7e6+e2CbJjcZ+zvvWf2xiR8UgLqHwOoKBBviW9y0LDxsEOACPrd4ctTr13rn2I0 4XqxW9QSwoNSRKBjjvNKXs4ukQQ33i/9fq0xAp3Spj2ACf1T7pk15W5hb03PHchaMUCG B/CIk9zT+mNnEM2RU/N0klEPU2jtTJi2F02ZSiIybUxosi7neBDUVWmoP1ygdE0tAvTx 8FAFVgMLN+0ZEcCdMR00oGjATI7mpGX4OsB611LNFJ6a+lbdSmaVkOOoBxcTStdKEkJX ewYQ== 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=s8Yn+KN2laV4GujjeaSFpvohUKhNZDFIBSN6YLJB5IY=; b=PDdGwsDNaHIuJWpD5e9AT4HUBoppPiaRtldP6GMe6PQvW+vky7goY4QivnArv8KIXs tfxVJ3JmPdHU6/GKLBKJQUZWTQho+NLitDh5uA10Zw0nJJb1k+fq9bX1R+NI11o4GdhS MjQxXep2nr2sA07/FlsIFPSuhijRnQcgwo2QStpZBKHi5ZUjXXLIEnlZ96ryhDw9WcXL sg/JldWLtjaoeyXzbZ4nh3UmoyrJAOBxz2Sbn66tRhaZ1MBB4zF+irGBlqePyWfjPoX4 MOO+EaRVlwR/iqnDcPvHWNH14ZtEkRndgefyAWXScwFEuWZg3Amws7h0HH/E6QIGHmsa SwlQ== X-Gm-Message-State: APjAAAV/6I4HCi44mDsP8yaKiLU8UYZBk45/C0n6rq+nNuxsYo2wsBUh ixMy5IDlQZyi3Brav+hZH3hdvEvIEuw= X-Received: by 2002:a17:902:900b:: with SMTP id a11mr26599001plp.116.1574671517516; Mon, 25 Nov 2019 00:45:17 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:1c20::d61]) by smtp.gmail.com with ESMTPSA id 136sm7472257pfb.49.2019.11.25.00.45.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 00:45:17 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Mon, 25 Nov 2019 00:44:51 -0800 Message-Id: <20191125084452.1515325-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191125084452.1515325-1-raj.khem@gmail.com> References: <20191125084452.1515325-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 3/4] xf86-input-synaptics: Fix build on 32bit arches when using 64bit time_t X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- .../64bit_time_t_support.patch | 51 +++++++++++++++++++ .../xorg-driver/xf86-input-synaptics_1.9.1.bb | 2 + 2 files changed, 53 insertions(+) create mode 100644 meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch -- 2.24.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch new file mode 100644 index 0000000000..4bb7fb3e23 --- /dev/null +++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics/64bit_time_t_support.patch @@ -0,0 +1,51 @@ +This patch avoids using time field of input_event structure which is not available +on 32bit arches supporting 64bit time_t structs, Patch makes it compatible with new +and keeps old input.h implementation functional as well. + +See https://sourceware.org/glibc/wiki/Y2038ProofnessDesign + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +--- a/src/eventcomm.c ++++ b/src/eventcomm.c +@@ -575,10 +575,12 @@ SynapticsReadEvent(InputInfoPtr pInfo, s + ev->type = EV_SYN; + ev->code = SYN_REPORT; + ev->value = 0; +- ev->time = last_event_time; +- } else if (ev->type == EV_SYN) +- last_event_time = ev->time; +- ++ ev->input_event_sec = last_event_time.tv_sec; ++ ev->input_event_usec = last_event_time.tv_usec; ++ } else if (ev->type == EV_SYN) { ++ last_event_time.tv_sec = ev->input_event_sec; ++ last_event_time.tv_usec = ev->input_event_usec; ++ } + return TRUE; + } + +@@ -725,7 +727,7 @@ EventReadHwState(InputInfoPtr pInfo, + case SYN_REPORT: + hw->numFingers = count_fingers(pInfo, comm); + if (proto_data->have_monotonic_clock) +- hw->millis = 1000 * ev.time.tv_sec + ev.time.tv_usec / 1000; ++ hw->millis = 1000 * ev.input_event_sec + ev.input_event_usec / 1000; + else + hw->millis = GetTimeInMillis(); + SynapticsCopyHwState(hwRet, hw); +--- a/src/eventcomm.h ++++ b/src/eventcomm.h +@@ -34,6 +34,11 @@ + #include + #include "synproto.h" + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + /* for auto-dev: */ + #define DEV_INPUT_EVENT "/dev/input" + #define EVENT_DEV_NAME "event" diff --git a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb index dc31890f69..388350c96e 100644 --- a/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb +++ b/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.1.bb @@ -10,6 +10,8 @@ advanced features of the touchpad to become available." LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398" +SRC_URI += "file://64bit_time_t_support.patch" + SRC_URI[md5sum] = "cfb79d3c975151f9bbf30b727c260cb9" SRC_URI[sha256sum] = "7af83526eff1c76e8b9e1553b34245c203d029028d8044dd9dcf71eef1001576"