1From bcf1d52853fc5e603ff4bca3495f860e81994108 Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Sat, 30 Nov 2019 10:07:43 -0800 4Subject: [PATCH] chromium: Fix build on 32bit arches with 64bit time_t 5 6time element is deprecated on new input_event structure in kernel's 7input.h [1] 8 9[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f 10 11Upstream-Status: Pending 12Signed-off-by: Khem Raj <raj.khem@gmail.com> 13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 14--- 15 chromium/ui/events/ozone/evdev/event_converter_evdev.h | 5 +++++ 16 chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc | 3 +-- 17 2 files changed, 6 insertions(+), 2 deletions(-) 18 19diff --git a/chromium/ui/events/ozone/evdev/event_converter_evdev.h b/chromium/ui/events/ozone/evdev/event_converter_evdev.h 20index 2d184811a00..fb2ba0069f1 100644 21--- a/chromium/ui/events/ozone/evdev/event_converter_evdev.h 22+++ b/chromium/ui/events/ozone/evdev/event_converter_evdev.h 23@@ -20,6 +20,11 @@ 24 #include "ui/events/ozone/evdev/event_dispatch_callback.h" 25 #include "ui/gfx/geometry/size.h" 26 27+#ifndef input_event_sec 28+#define input_event_sec time.tv_sec 29+#define input_event_usec time.tv_usec 30+#endif 31+ 32 struct input_event; 33 34 namespace ui { 35diff --git a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc 36index b8d089f7381..5d2d08b1ec6 100644 37--- a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc 38+++ b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc 39@@ -62,8 +62,7 @@ void TouchEventLogEvdev::DumpLog(const char* filename) { 40 continue; 41 std::string event_string = base::StringPrintf( 42 "E: %ld.%06ld %04x %04x %d %d\n", te->ev.input_event_sec, 43- te->ev.input_event_usec, te->ev.type, te->ev.code, te->ev.value, 44- te->slot); 45+ te->ev.input_event_usec, te->ev.type, te->ev.code, te->ev.value, te->slot); 46 report_content += event_string; 47 } 48 file.Write(0, report_content.c_str(), report_content.length()); 49