From patchwork Sun Dec 1 18:46:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 180549 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4276079ile; Sun, 1 Dec 2019 10:48:11 -0800 (PST) X-Google-Smtp-Source: APXvYqycjnb+j3rNsV3G+n+qywvD5EBYVYDGdf38OlXY7z5nlkvFTGsUEiDW2h0pPZLUp8yMCIZS X-Received: by 2002:a62:3343:: with SMTP id z64mr14881327pfz.150.1575226090981; Sun, 01 Dec 2019 10:48:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575226090; cv=none; d=google.com; s=arc-20160816; b=m2RWT8rse4mbhFmQys/lC/7oH2IEO7HhHjQ1NdoOmTPE6I5+evx/aqcgTbegoNUKk8 q2FF0eebGmt55ZnT3ueo97ryoG3SaBvgyoHnBqeRwYzyYKa+Q0YeFPXpPqrO7iz+sfeL VFunPaqpxoeSFq+Fyxnt4oWDV+bycJgDSYXt0O7L+nnSdjtOisuag1d1prfaGlX7kQYc Xn9W9Vzsp7/Sq3vz2yk25erjPT4Kesl0AEbxkt+X2DwjP48wgc7/ztIu/0k4khhT36ar kUq+kN9zC32PDb7CfmQ0VY2MR+LjSLIeCBnD9/AB+FqHsOBSgPLMHkWbfUHwnSDYr1hB UK2Q== 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=7CU9HUdlxBxXl2AVfaHStptlCivOs/qh4b7ZjuveVGc=; b=HWbqpHCu7PgNo6RUKML2++mYleFsDmjk2SBjpq+4K7+p2u/py7ROCCtvH4C8Lv7pJ9 wOEIs02MWWsOa9/uiYmQluLUNxQjNgjK3QN41c07QGegEbQ5Zclo9i4TbE6M4+ffXBxW bCkq9keI+jNiw2A/kSLjyc6vC3OzAoA2XILDejjxvt0hT5Mg4IuRYlCCwViN5uvSOgTo E9n+VOl9ZV4CXo1FvnHVWijoAPO7Vi6C630RUaLgCOj3CQnf98aOv+RT/3k4cat72w5n vSKYYb9kw+SELBDOQdhNT6qQcw/0YNGYI9tDBlLzE4nmljj3pYdp8aD0c8p7HO5A+giS jKCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=EKKvvKCD; 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 o191si10280421pfg.151.2019.12.01.10.48.10; Sun, 01 Dec 2019 10:48:10 -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=EKKvvKCD; 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 8BF7D7F7AF; Sun, 1 Dec 2019 18:47:33 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by mail.openembedded.org (Postfix) with ESMTP id 9FB547F57B for ; Sun, 1 Dec 2019 18:46:40 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id j12so15221481plt.9 for ; Sun, 01 Dec 2019 10:46:42 -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=8M+EWRZegpJRFAZsRz87fEgbHc9sIlJGj4IsRZHrkzg=; b=EKKvvKCDgwUroYHrnU9WNtB6jvc4oUdcyysi0tKChBndrI43x3a+gAPQZhkzJihyzw kAU8dzNIkfceI//H/uyKU00ePTjJ9tNnk+7bIXljA7cY5SMlKJ0vU/uDrX7ht3XxpATg UlL6m/j/ZoPRBQx/fZrvs67VHj/HEJhx5CEQiyArOIwCveqWXjIy1/HzKvdUZTJNnerd 8aFDdoY1DLbIvvC8El0kPq4saP3pBI5JgjEiS14marZjcIXwP8HJuwIkWaifPW1oE7Zi 2O4qXXQR/mW4X1T+M7UYTs5ZQQ9a1secMIiqcrmndBz9bmvhkFCAb6CowZwfpHP5LHzA riLw== 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=8M+EWRZegpJRFAZsRz87fEgbHc9sIlJGj4IsRZHrkzg=; b=HPfHqQYlyVksb8gjtyadJz6az5fAs50LQ4MB5kwTuZRpWUHNm1Pk9R/pVuHUld/1V1 k+xIaQygpss6WW/a9aU/DNLiUn0LEWx85crl4HE/TbwGCSpEMSaNzBwwZ1s/cLupsRp6 BMspFaOmdkeXZUXaPBjLiXqFd2l9yJEpMSwa8KTJYBFTTgFU6mFA9v/tZ9KFpta5B1Kw jn994duQ3XorCxBzMndmMj2XdSlsGPdSSBpOkPy/QJ9cw00SdF0Hc2GtIgqdRBtZzbHX 2HeKrqXaebtRLIJanyVW2iYkRqt/1cqAULA+29OqBcMvL0YoikOdb50u/TGnWX6BQzp3 DzRA== X-Gm-Message-State: APjAAAVqUzwlnALQnMvgtpN+4ZUIx3wFGu4wrfN6jo4dZVe3S1HIMh3R 5s2nlaZOyKIje+ooW9kTQ1ibL3qdk4g= X-Received: by 2002:a17:90a:c795:: with SMTP id gn21mr2160409pjb.95.1575226001142; Sun, 01 Dec 2019 10:46:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Dec 2019 10:46:40 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Sun, 1 Dec 2019 10:46:21 -0800 Message-Id: <20191201184622.889513-8-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 8/9] directfb: 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 --- .../recipes-graphics/directfb/directfb.inc | 3 +- ...ld-on-32bit-arches-with-64bit-time_t.patch | 139 ++++++++++++++++++ 2 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-graphics/directfb/directfb/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/directfb/directfb.inc b/meta-oe/recipes-graphics/directfb/directfb.inc index 96aa31117f..65fd89e6fe 100644 --- a/meta-oe/recipes-graphics/directfb/directfb.inc +++ b/meta-oe/recipes-graphics/directfb/directfb.inc @@ -21,7 +21,8 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.g file://use-PTHREAD_MUTEX_RECURSIVE.patch \ file://fix-client-gfx_state-initialisation.patch \ file://fix-tslib-version-check.patch \ - " + file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ + " S = "${WORKDIR}/DirectFB-${PV}" diff --git a/meta-oe/recipes-graphics/directfb/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/meta-oe/recipes-graphics/directfb/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file mode 100644 index 0000000000..2f766465e1 --- /dev/null +++ b/meta-oe/recipes-graphics/directfb/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -0,0 +1,139 @@ +From 0b66557f2e924023b12006b58d8e86149c745aed Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 30 Nov 2019 20:34:33 -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: Pending +Signed-off-by: Khem Raj +--- + inputdrivers/linux_input/linux_input.c | 36 ++++++++++++++++++-------- + 1 file changed, 25 insertions(+), 11 deletions(-) + +diff --git a/inputdrivers/linux_input/linux_input.c b/inputdrivers/linux_input/linux_input.c +index 7e9a6ad..03deebc 100644 +--- a/inputdrivers/linux_input/linux_input.c ++++ b/inputdrivers/linux_input/linux_input.c +@@ -42,6 +42,11 @@ typedef unsigned long kernel_ulong_t; + + #include + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + #ifndef KEY_OK + /* Linux kernel 2.5.42+ defines additional keys in linux/input.h */ + #include "input_fake.h" +@@ -754,7 +759,8 @@ translate_event( const LinuxInputData *data, + DFBInputEvent *devt ) + { + devt->flags = DIEF_TIMESTAMP; +- devt->timestamp = levt->time; ++ devt->timestamp.tv_sec = levt->input_event_sec; ++ devt->timestamp.tv_usec = levt->input_event_usec; + + switch (levt->type) { + case EV_KEY: +@@ -2139,7 +2145,8 @@ touchpad_translate( struct touchpad_fsm_state *state, + int abs, rel; + + devt->flags = DIEF_TIMESTAMP | (dfb_config->linux_input_touch_abs ? DIEF_AXISABS : DIEF_AXISREL); +- devt->timestamp = levt->time; ++ devt->timestamp.tv_sec = levt->input_event_sec; ++ devt->timestamp.tv_usec = levt->input_event_usec; + devt->type = DIET_AXISMOTION; + + switch (levt->code) { +@@ -2204,7 +2211,7 @@ touchpad_fsm( struct touchpad_fsm_state *state, + DFBInputEvent *devt ) + { + struct timeval timeout = { 0, 125000 }; +- ++ struct timeval tval; + /* select() timeout? */ + if (!levt) { + /* Check if button release is due. */ +@@ -2223,6 +2230,8 @@ touchpad_fsm( struct touchpad_fsm_state *state, + return 0; + } + ++ tval.tv_sec = levt->input_event_sec; ++ tval.tv_usec = levt->input_event_usec; + /* More or less ignore these events for now */ + if ((levt->type == EV_SYN && levt->code == SYN_REPORT) || + (levt->type == EV_ABS && levt->code == ABS_PRESSURE) || +@@ -2233,7 +2242,7 @@ touchpad_fsm( struct touchpad_fsm_state *state, + + /* Check if button release is due. */ + if (state->fsm_state == TOUCHPAD_FSM_DRAG_START && +- timeout_passed( &state->timeout, &levt->time )) { ++ timeout_passed( &state->timeout, &tval )) { + devt->flags = DIEF_TIMESTAMP; + devt->timestamp = state->timeout; /* timeout of levt->time? */ + devt->type = DIET_BUTTONRELEASE; +@@ -2255,7 +2264,8 @@ touchpad_fsm( struct touchpad_fsm_state *state, + case TOUCHPAD_FSM_START: + if (touchpad_finger_landing( levt )) { + state->fsm_state = TOUCHPAD_FSM_MAIN; +- state->timeout = levt->time; ++ state->timeout.tv_sec = levt->input_event_sec; ++ state->timeout.tv_usec = levt->input_event_usec; + timeout_add( &state->timeout, &timeout ); + } + return 0; +@@ -2268,15 +2278,17 @@ touchpad_fsm( struct touchpad_fsm_state *state, + } + } + else if (touchpad_finger_leaving( levt )) { +- if (!timeout_passed( &state->timeout, &levt->time )) { ++ if (!timeout_passed( &state->timeout, &tval )) { + devt->flags = DIEF_TIMESTAMP; +- devt->timestamp = levt->time; ++ devt->timestamp.tv_sec = levt->input_event_sec; ++ devt->timestamp.tv_usec = levt->input_event_usec; + devt->type = DIET_BUTTONPRESS; + devt->button = DIBI_FIRST; + + touchpad_fsm_init( state ); + state->fsm_state = TOUCHPAD_FSM_DRAG_START; +- state->timeout = levt->time; ++ state->timeout.tv_sec = levt->input_event_sec; ++ state->timeout.tv_usec = levt->input_event_usec; + timeout_add( &state->timeout, &timeout ); + return 1; + } +@@ -2287,7 +2299,7 @@ touchpad_fsm( struct touchpad_fsm_state *state, + return 0; + + case TOUCHPAD_FSM_DRAG_START: +- if (timeout_passed( &state->timeout, &levt->time )){ ++ if (timeout_passed( &state->timeout, &tval )){ + devt->flags = DIEF_TIMESTAMP; + devt->timestamp = state->timeout; /* timeout of levt->time? */ + devt->type = DIET_BUTTONRELEASE; +@@ -2299,7 +2311,8 @@ touchpad_fsm( struct touchpad_fsm_state *state, + else { + if (touchpad_finger_landing( levt )) { + state->fsm_state = TOUCHPAD_FSM_DRAG_MAIN; +- state->timeout = levt->time; ++ state->timeout.tv_sec = levt->input_event_sec; ++ state->timeout.tv_usec = levt->input_event_usec; + timeout_add( &state->timeout, &timeout ); + } + } +@@ -2314,7 +2327,8 @@ touchpad_fsm( struct touchpad_fsm_state *state, + } + else if (touchpad_finger_leaving( levt )) { + devt->flags = DIEF_TIMESTAMP; +- devt->timestamp = levt->time; ++ devt->timestamp.tv_sec = levt->input_event_sec; ++ devt->timestamp.tv_usec = levt->input_event_usec; + devt->type = DIET_BUTTONRELEASE; + devt->button = DIBI_FIRST; +