summaryrefslogtreecommitdiff
path: root/user/qemu/time64.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-01-24 06:47:02 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-01-24 06:47:02 +0000
commit437a0fdd5707db3a7ae31247df5cff2a62778a93 (patch)
tree3e93da6e4eb7e21ab7184fcf40658b170881c3da /user/qemu/time64.patch
parent4a699fe5f95c969c9a237a277cf9879e45540dc9 (diff)
downloadpackages-437a0fdd5707db3a7ae31247df5cff2a62778a93.tar.gz
packages-437a0fdd5707db3a7ae31247df5cff2a62778a93.tar.bz2
packages-437a0fdd5707db3a7ae31247df5cff2a62778a93.tar.xz
packages-437a0fdd5707db3a7ae31247df5cff2a62778a93.zip
user/qemu: Fix build with 64-bit time_t
Diffstat (limited to 'user/qemu/time64.patch')
-rw-r--r--user/qemu/time64.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/user/qemu/time64.patch b/user/qemu/time64.patch
new file mode 100644
index 000000000..8ec9f45df
--- /dev/null
+++ b/user/qemu/time64.patch
@@ -0,0 +1,20 @@
+--- qemu-3.0.0/hw/input/virtio-input-host.c.old 2018-08-14 19:10:34.000000000 +0000
++++ qemu-3.0.0/hw/input/virtio-input-host.c 2020-01-24 06:12:08.788062930 +0000
+@@ -193,13 +193,16 @@
+ {
+ VirtIOInputHost *vih = VIRTIO_INPUT_HOST(vinput);
+ struct input_event evdev;
++ struct timeval tv;
+ int rc;
+
+- if (gettimeofday(&evdev.time, NULL)) {
++ if (gettimeofday(&tv, NULL)) {
+ perror("virtio_input_host_handle_status: gettimeofday");
+ return;
+ }
+
++ evdev.input_event_sec = tv.tv_sec;
++ evdev.input_event_usec = tv.tv_usec;
+ evdev.type = le16_to_cpu(event->type);
+ evdev.code = le16_to_cpu(event->code);
+ evdev.value = le32_to_cpu(event->value);