kumquat-buildroot/package/qt5/qt5base/0005-evdevkeyboard-fix-input_event-time-related-compile.patch
Peter Seiderer bbd91e41c8 package/qt5/qt5base: fix input_event related compile failure
Fixes:

  - http://autobuild.buildroot.net/results/af76190876656252eb6f60220cdb1d627a03b7c3

  evdevkeyboard/qevdevkeyboardhandler.cpp: In member function ‘void QEvdevKeyboardHandler::switchLed(int, bool)’:
  evdevkeyboard/qevdevkeyboardhandler.cpp:153:28: error: ‘struct input_event’ has no member named ‘time’; did you mean ‘type’?
       ::gettimeofday(&led_ie.time, 0);
                              ^~~~
                              type

  evdevtouch/qevdevtouchhandler.cpp: In member function ‘void QEvdevTouchScreenData::processInputEvent(input_event*)’:
  evdevtouch/qevdevtouchhandler.cpp:579:29: error: ‘struct input_event’ has no member named ‘time’; did you mean ‘type’?
           m_timeStamp = data->time.tv_sec + data->time.tv_usec / 1000000.0;
                               ^~~~
                               type
  evdevtouch/qevdevtouchhandler.cpp:579:49: error: ‘struct input_event’ has no member named ‘time’; did you mean ‘type’?
           m_timeStamp = data->time.tv_sec + data->time.tv_usec / 1000000.0;
                                                   ^~~~
                                                   type

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-05-09 23:14:37 +02:00

58 lines
1.9 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From e3821efb37d64d599760b82beac024804188b824 Mon Sep 17 00:00:00 2001
From: Peter Seiderer <ps.report@gmx.net>
Date: Mon, 4 May 2020 23:17:45 +0200
Subject: [PATCH] evdevkeyboard: fix input_event time related compile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes:
evdevkeyboard/qevdevkeyboardhandler.cpp: In member function void QEvdevKeyboardHandler::switchLed(int, bool):
evdevkeyboard/qevdevkeyboardhandler.cpp:153:28: error: struct input_event has no member named time; did you mean type?
::gettimeofday(&led_ie.time, 0);
^~~~
type
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Upstream: https://github.com/qt/qtbase/commit/c5b8b662105cc5ced968da9f567fe1134c52d6b5
---
.../input/evdevkeyboard/qevdevkeyboardhandler.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
index 3555763b..de37f5e2 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
@@ -58,6 +58,14 @@
#include <linux/input.h>
#endif
+#ifndef input_event_sec
+#define input_event_sec time.tv_sec
+#endif
+
+#ifndef input_event_usec
+#define input_event_usec time.tv_usec
+#endif
+
QT_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(qLcEvdevKey, "qt.qpa.input")
@@ -149,8 +157,11 @@ void QEvdevKeyboardHandler::switchLed(int led, bool state)
{
qCDebug(qLcEvdevKey, "switchLed %d %d", led, int(state));
+ struct timeval tv;
+ ::gettimeofday(&tv, 0);
struct ::input_event led_ie;
- ::gettimeofday(&led_ie.time, 0);
+ led_ie.input_event_sec = tv.tv_sec;
+ led_ie.input_event_usec = tv.tv_usec;
led_ie.type = EV_LED;
led_ie.code = led;
led_ie.value = state;
--
2.26.2