diff --git a/srcpkgs/qemu-user-static/template b/srcpkgs/qemu-user-static/template index 874effec030..c29ed1dadf2 100644 --- a/srcpkgs/qemu-user-static/template +++ b/srcpkgs/qemu-user-static/template @@ -2,7 +2,7 @@ # This package should be updated together with qemu pkgname=qemu-user-static version=9.0.0 -revision=1 +revision=2 build_style=configure configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --disable-kvm --disable-png --disable-virtfs --disable-fdt --disable-seccomp diff --git a/srcpkgs/qemu/patches/musl-mmap.patch b/srcpkgs/qemu/patches/musl-mmap.patch new file mode 100644 index 00000000000..2909f0a896d --- /dev/null +++ b/srcpkgs/qemu/patches/musl-mmap.patch @@ -0,0 +1,33 @@ +source: https://gitlab.com/qemu-project/qemu/-/issues/2353 + +diff --git a/linux-user/mmap.c b/linux-user/mmap.c +index be3b9a6..dad29ef 100644 +--- a/linux-user/mmap.c ++++ b/linux-user/mmap.c +@@ -559,7 +559,7 @@ static abi_long mmap_h_eq_g(abi_ulong start, abi_ulong len, + int host_prot, int flags, int page_flags, + int fd, off_t offset) + { +- void *p, *want_p = g2h_untagged(start); ++ void *p, *want_p = start ? g2h_untagged(start) : 0; + abi_ulong last; + + p = mmap(want_p, len, host_prot, flags, fd, offset); +@@ -609,7 +609,7 @@ static abi_long mmap_h_lt_g(abi_ulong start, abi_ulong len, int host_prot, + int mmap_flags, int page_flags, int fd, + off_t offset, int host_page_size) + { +- void *p, *want_p = g2h_untagged(start); ++ void *p, *want_p = start ? g2h_untagged(start) : 0; + off_t fileend_adj = 0; + int flags = mmap_flags; + abi_ulong last, pass_last; +@@ -739,7 +739,7 @@ static abi_long mmap_h_gt_g(abi_ulong start, abi_ulong len, + int flags, int page_flags, int fd, + off_t offset, int host_page_size) + { +- void *p, *want_p = g2h_untagged(start); ++ void *p, *want_p = start ? g2h_untagged(start) : 0; + off_t host_offset = offset & -host_page_size; + abi_ulong last, real_start, real_last; + bool misaligned_offset = false; diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template index 184b1396f33..623f197ff9b 100644 --- a/srcpkgs/qemu/template +++ b/srcpkgs/qemu/template @@ -2,7 +2,7 @@ # This package should be updated together with qemu-user-static pkgname=qemu version=9.0.0 -revision=1 +revision=2 build_style=configure configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --localstatedir=/var --disable-glusterfs --disable-xen --enable-docs --enable-kvm --enable-libusb --enable-pie