void-packages/srcpkgs/qemu/patches/musl-fix-sigevent-and-sigval_t.patch
Evgeny Ermakov 4b63bc6096 qemu: update to 6.2.0.
Also:
 - clean up template
 - add build option for pulseaudio
 - use spice unconditionally
 - use system dtc, libslirp
 - fix CVE-2022-0358
2022-02-26 11:32:36 +01:00

27 lines
839 B
Diff

Note: Remove this patch with musl 1.2.2
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5020,10 +5020,21 @@
#ifndef HAVE_SIGEV_NOTIFY_THREAD_ID
#define sigev_notify_thread_id _sigev_un._tid
#endif
-static inline abi_long target_to_host_sigevent(struct sigevent *host_sevp,
+struct host_sigevent {
+ union sigval sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+ union {
+ char _pad[64 - sizeof(int) * 2 - sizeof(union sigval)];
+ int _tid;
+ } _sigev_un;
+};
+
+static inline abi_long target_to_host_sigevent(struct sigevent *sevp,
abi_ulong target_addr)
{
+ struct host_sigevent *host_sevp = (struct host_sigevent *) sevp;
struct target_sigevent *target_sevp;
if (!lock_user_struct(VERIFY_READ, target_sevp, target_addr, 1)) {