aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch
blob: 41730a8eaf11436657fb0bf3f168baeee0c2182e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From d0b000b79a7c5da37d87881cca465847f768b8fc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Nov 2019 10:07:43 -0800
Subject: [PATCH] chromium: 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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 chromium/ui/events/ozone/evdev/event_converter_evdev.h     | 5 +++++
 chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc | 3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/chromium/ui/events/ozone/evdev/event_converter_evdev.h b/chromium/ui/events/ozone/evdev/event_converter_evdev.h
index 2d184811a00..fb2ba0069f1 100644
--- a/chromium/ui/events/ozone/evdev/event_converter_evdev.h
+++ b/chromium/ui/events/ozone/evdev/event_converter_evdev.h
@@ -20,6 +20,11 @@
 #include "ui/events/ozone/evdev/event_dispatch_callback.h"
 #include "ui/gfx/geometry/size.h"
 
+#ifndef input_event_sec
+#define input_event_sec time.tv_sec
+#define input_event_usec time.tv_usec
+#endif
+
 struct input_event;
 
 namespace ui {
diff --git a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc
index b8d089f7381..5d2d08b1ec6 100644
--- a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc
+++ b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc
@@ -62,8 +62,7 @@ void TouchEventLogEvdev::DumpLog(const char* filename) {
       continue;
     std::string event_string = base::StringPrintf(
         "E: %ld.%06ld %04x %04x %d %d\n", te->ev.input_event_sec,
-        te->ev.input_event_usec, te->ev.type, te->ev.code, te->ev.value,
-        te->slot);
+        te->ev.input_event_usec, te->ev.type, te->ev.code, te->ev.value, te->slot);
     report_content += event_string;
   }
   file.Write(0, report_content.c_str(), report_content.length());