summaryrefslogtreecommitdiff
path: root/user/qt5-qtbase/time64.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-27 04:02:42 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-27 04:02:42 -0600
commit47d18b13213ccd7c51894796760f97571c3eb424 (patch)
tree6e31cc5d066c199564a5c8f34a40d313a08c44aa /user/qt5-qtbase/time64.patch
parent9b07de55dfe6d50baeda3a8feda7f9fcade9c647 (diff)
downloadpackages-47d18b13213ccd7c51894796760f97571c3eb424.tar.gz
packages-47d18b13213ccd7c51894796760f97571c3eb424.tar.bz2
packages-47d18b13213ccd7c51894796760f97571c3eb424.tar.xz
packages-47d18b13213ccd7c51894796760f97571c3eb424.zip
user/qt5: Bump to 5.12.6 LTS
This updates Qt 5 to the latest LTS release available. Notable changes: * The infamous clipboard bug (upstream QTBUG-65145; Gerrit 254187) is fixed! * Qt Declarative's "V4 JIT" is disabled globally on pmmx. It is no longer (easily) possible to turn off the JIT selectively based on CPU capability. * Qt Script builds correctly on GCC 8 now. This does not include: * Build testing of Qt Multimedia (yet); this depends on the time64-isation of the alsa-lib package (at least). * Build testing of Qt Speech (yet); speech-dispatcher also deps on alsa-lib indirectly. * Qt WebKit 5.212. This will be committed later.
Diffstat (limited to 'user/qt5-qtbase/time64.patch')
-rw-r--r--user/qt5-qtbase/time64.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/user/qt5-qtbase/time64.patch b/user/qt5-qtbase/time64.patch
new file mode 100644
index 000000000..76b4671c6
--- /dev/null
+++ b/user/qt5-qtbase/time64.patch
@@ -0,0 +1,62 @@
+From e06ac2e26c8490a7b8702e9462d1f38244ac3f0f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 25 Nov 2019 08:27:39 -0800
+Subject: [PATCH] input: Make use of timeval portable for 64bit time_t
+
+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: Submitted [https://codereview.qt-project.org/c/qt/qtbase/+/282610]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ .../input/evdevkeyboard/qevdevkeyboardhandler.cpp | 10 +++++++++-
+ .../input/evdevtouch/qevdevtouchhandler.cpp | 2 +-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+index 666613f09d..0e3e0ea0de 100644
+--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
++++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+@@ -58,6 +58,11 @@
+ #include <linux/input.h>
+ #endif
+
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ QT_BEGIN_NAMESPACE
+
+ Q_LOGGING_CATEGORY(qLcEvdevKey, "qt.qpa.input")
+@@ -149,7 +154,10 @@ void QEvdevKeyboardHandler::switchLed(int led, bool state)
+ qCDebug(qLcEvdevKey) << "switchLed" << led << state;
+
+ struct ::input_event led_ie;
+- ::gettimeofday(&led_ie.time, 0);
++ struct timeval tval;
++ ::gettimeofday(&tval, 0);
++ led_ie.input_event_sec = tval.tv_sec;
++ led_ie.input_event_usec = tval.tv_usec;
+ led_ie.type = EV_LED;
+ led_ie.code = led;
+ led_ie.value = state;
+diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+index f86f80785e..3914698f2a 100644
+--- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
++++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp
+@@ -568,7 +568,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
+
+ // update timestamps
+ m_lastTimeStamp = m_timeStamp;
+- m_timeStamp = data->time.tv_sec + data->time.tv_usec / 1000000.0;
++ m_timeStamp = data->input_event_sec + data->input_event_usec / 1000000.0;
+
+ m_lastTouchPoints = m_touchPoints;
+ m_touchPoints.clear();
+--
+2.24.0
+