blob: 26110240894293b1d699adebab36b244247a8a22 (
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
|
From 91b643a9fd57d994ee8e5b25b2c8a4a81a973a00 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 31 Aug 2020 14:07:21 -0700
Subject: [PATCH] define sec/usec based on platform wordlength
helps it compile and run on 32-bit arm
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/anbox/input/device.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/anbox/input/device.cpp b/src/anbox/input/device.cpp
index 9efd347..43de9bb 100644
--- a/src/anbox/input/device.cpp
+++ b/src/anbox/input/device.cpp
@@ -59,8 +59,13 @@ void Device::send_events(const std::vector<Event> &events) {
// NOTE: A bit dirty but as we're running currently a 64 bit container
// struct input_event has a different size. We rebuild the struct here
// to reach the correct size.
+#ifdef __LP64__
std::uint64_t sec;
std::uint64_t usec;
+#else
+ std::uint32_t sec;
+ std::uint32_t usec;
+#endif
std::uint16_t type;
std::uint16_t code;
std::uint32_t value;
|