Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
2bfdc984
Commit
2bfdc984
authored
4 years ago
by
Natanael Copa
Browse files
Options
Downloads
Patches
Plain Diff
community/directfb: time64 build fix
parent
f263d359
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11958
community/rclone: upgrade to 1.52.3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
community/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
+139
-0
139 additions, 0 deletions
...fb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
community/directfb/APKBUILD
+4
-2
4 additions, 2 deletions
community/directfb/APKBUILD
with
143 additions
and
2 deletions
community/directfb/0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
0 → 100644
+
139
−
0
View file @
2bfdc984
From 0b66557f2e924023b12006b58d8e86149c745aed Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
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 <raj.khem@gmail.com>
---
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 <linux/input.h>
+#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;
This diff is collapsed.
Click to expand it.
community/directfb/APKBUILD
+
4
−
2
View file @
2bfdc984
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# Maintainer: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname
=
directfb
pkgname
=
directfb
pkgver
=
1.7.7
pkgver
=
1.7.7
pkgrel
=
2
pkgrel
=
3
pkgdesc
=
"Library for hw graphics acceleration, input dev, windowing system on top of the Linux fb device"
pkgdesc
=
"Library for hw graphics acceleration, input dev, windowing system on top of the Linux fb device"
arch
=
"all"
arch
=
"all"
url
=
"https://github.com/DirectFB/directfb"
url
=
"https://github.com/DirectFB/directfb"
...
@@ -19,6 +19,7 @@ source="
...
@@ -19,6 +19,7 @@ source="
0005-fix-tslib-configure.patch
0005-fix-tslib-configure.patch
0006-fix-client-gfx_state-initialisation.patch
0006-fix-client-gfx_state-initialisation.patch
0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch
0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch
0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch
"
"
prepare
()
{
prepare
()
{
...
@@ -59,4 +60,5 @@ bd1d0738c48411e8e065b8a250c1b31334ac65b26a8f6c91d5ad167a4d8fdac1de862c05940567e4
...
@@ -59,4 +60,5 @@ bd1d0738c48411e8e065b8a250c1b31334ac65b26a8f6c91d5ad167a4d8fdac1de862c05940567e4
d68002702f3521a71405bb403b874dced5b123a2de037c9eb05667123a578c0e9a9f13a822fd8d77e31a83f1e1cc8df1d8511f7d2f427688d5ef6ae0fff448c5 0004-disable-fusion_dispatch.patch
d68002702f3521a71405bb403b874dced5b123a2de037c9eb05667123a578c0e9a9f13a822fd8d77e31a83f1e1cc8df1d8511f7d2f427688d5ef6ae0fff448c5 0004-disable-fusion_dispatch.patch
c768ca7a4dae7fc0cd7d4fa559ab74adb6b5f21245e0f9b5d56af15b20effc04e6739e86d52d65c902c5e76ad72e966cd9db68f57a9bad11a004525825d443a4 0005-fix-tslib-configure.patch
c768ca7a4dae7fc0cd7d4fa559ab74adb6b5f21245e0f9b5d56af15b20effc04e6739e86d52d65c902c5e76ad72e966cd9db68f57a9bad11a004525825d443a4 0005-fix-tslib-configure.patch
6b118928c2ebe58654e1bf32433b084f4dc150526eec1b53f9eb4b856aee25733bd8d6114fde973fcb64416e4146f458cdb75e5836d7507cf802b84e44544462 0006-fix-client-gfx_state-initialisation.patch
6b118928c2ebe58654e1bf32433b084f4dc150526eec1b53f9eb4b856aee25733bd8d6114fde973fcb64416e4146f458cdb75e5836d7507cf802b84e44544462 0006-fix-client-gfx_state-initialisation.patch
43000c629eb24bd6b88d284dc010ea5a2a3facbf9498ab752127c25a890fd52b9a29a09d46264befea9fef19dcfe6f24d6cefa103a68d4c2ab185b6142a5c1b9 0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch"
43000c629eb24bd6b88d284dc010ea5a2a3facbf9498ab752127c25a890fd52b9a29a09d46264befea9fef19dcfe6f24d6cefa103a68d4c2ab185b6142a5c1b9 0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch
a21470281e7886ee37b0c1e49498e250a890894cee8ab6c5d46f563cd75c132d112d993e047ca0649b7cd545f07b5a6476e7027e56bcc9bd2350d282f01f71b3 0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment