From dddafec47e7cdd8ee83c963f947a540d48ed9cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sat, 12 Dec 2020 21:17:51 +0100 Subject: [PATCH] qemu: fix build w/ musl-1.2.1 (time64) --- srcpkgs/qemu/patches/time64.patch | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 srcpkgs/qemu/patches/time64.patch diff --git a/srcpkgs/qemu/patches/time64.patch b/srcpkgs/qemu/patches/time64.patch new file mode 100644 index 0000000000..7f74ed3569 --- /dev/null +++ b/srcpkgs/qemu/patches/time64.patch @@ -0,0 +1,42 @@ +--- contrib/vhost-user-input/main.c 2020-12-08 17:59:44.000000000 +0100 ++++ contrib/vhost-user-input/main.c 2020-12-12 20:59:04.316996648 +0100 +@@ -114,14 +114,17 @@ + + static void vi_handle_status(VuInput *vi, virtio_input_event *event) + { ++ struct timeval tv; + struct input_event evdev; + int rc; + +- if (gettimeofday(&evdev.time, NULL)) { ++ if (gettimeofday(&tv, NULL)) { + perror("vi_handle_status: gettimeofday"); + return; + } + ++ evdev.input_event_sec = tv.tv_sec; ++ evdev.input_event_usec = tv.tv_usec; + evdev.type = le16toh(event->type); + evdev.code = le16toh(event->code); + evdev.value = le32toh(event->value); +--- hw/input/virtio-input-host.c 2020-12-08 17:59:44.000000000 +0100 ++++ hw/input/virtio-input-host.c 2020-12-12 21:33:44.750471890 +0100 +@@ -192,14 +192,17 @@ + virtio_input_event *event) + { + VirtIOInputHost *vih = VIRTIO_INPUT_HOST(vinput); ++ struct timeval tv; + struct input_event evdev; + 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);