diff options
-rw-r--r-- | main/qemu/0001-linux-user-avoid-using-glibc-internals-in-_syscall5-.patch | 68 | ||||
-rw-r--r-- | main/qemu/0002-util-qemu-openpty-fix-build-with-musl-libc-by-includ.patch | 42 | ||||
-rw-r--r-- | main/qemu/0003-xen-replace-ffsl-with-ctzl.patch | 32 | ||||
-rw-r--r-- | main/qemu/0004-vhost-replace-ffsl-with-ctzl.patch | 49 | ||||
-rw-r--r-- | main/qemu/0005-exec-replace-ffsl-with-ctzl.patch | 32 | ||||
-rw-r--r-- | main/qemu/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch | 37 | ||||
-rw-r--r-- | main/qemu/APKBUILD | 59 | ||||
-rw-r--r-- | main/qemu/musl-F_SHLCK-and-F_EXLCK.patch | 21 | ||||
-rw-r--r-- | main/qemu/qemu-170-ffsl.patch | 22 | ||||
-rw-r--r-- | main/qemu/qemu-170-ffsll.patch | 18 | ||||
-rw-r--r-- | main/qemu/qemu-170-openpty.patch | 11 | ||||
-rw-r--r-- | main/qemu/qemu-170-sigset_t.patch | 11 | ||||
-rw-r--r-- | main/qemu/sigev_pad.patch | 18 |
13 files changed, 312 insertions, 108 deletions
diff --git a/main/qemu/0001-linux-user-avoid-using-glibc-internals-in-_syscall5-.patch b/main/qemu/0001-linux-user-avoid-using-glibc-internals-in-_syscall5-.patch new file mode 100644 index 000000000..2ee0bbe7f --- /dev/null +++ b/main/qemu/0001-linux-user-avoid-using-glibc-internals-in-_syscall5-.patch @@ -0,0 +1,68 @@ +From 73a0fc74069c5dd4c5895a406b9cc64358da90e6 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Wed, 23 Apr 2014 16:51:31 +0200 +Subject: [PATCH 1/6] linux-user: avoid using glibc internals in _syscall5 and + in definition of target_sigevent struct + +Use the public sigset_t instead of the glibc specific internal +__sigset_t in _syscall. + +Calculate the sigevent pad size is calculated in similar way as kernel +does it instead of using glibc internal field _pad. + +This is needed for building with musl libc. + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + linux-user/syscall.c | 2 +- + linux-user/syscall_defs.h | 16 +++++++++++++++- + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 9864813..c8989b6 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -406,7 +406,7 @@ static int sys_inotify_init1(int flags) + #endif + #define __NR_sys_ppoll __NR_ppoll + _syscall5(int, sys_ppoll, struct pollfd *, fds, nfds_t, nfds, +- struct timespec *, timeout, const __sigset_t *, sigmask, ++ struct timespec *, timeout, const sigset_t *, sigmask, + size_t, sigsetsize) + #endif + +diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h +index fdf9a47..69c3982 100644 +--- a/linux-user/syscall_defs.h ++++ b/linux-user/syscall_defs.h +@@ -2552,12 +2552,26 @@ struct target_timer_t { + abi_ulong ptr; + }; + ++#define TARGET_SIGEV_MAX_SIZE 64 ++ ++/* This is architecture-specific but most architectures use the default */ ++#ifdef TARGET_MIPS ++#define TARGET_SIGEV_PREAMBLE_SIZE (sizeof(int32_t) * 2 + sizeof(abi_long)) ++#else ++#define TARGET_SIGEV_PREAMBLE_SIZE (sizeof(int32_t) * 2 \ ++ + sizeof(target_sigval_t)) ++#endif ++ ++#define TARGET_SIGEV_PAD_SIZE ((TARGET_SIGEV_MAX_SIZE \ ++ - TARGET_SIGEV_PREAMBLE_SIZE) \ ++ / sizeof(int32_t)) ++ + struct target_sigevent { + target_sigval_t sigev_value; + int32_t sigev_signo; + int32_t sigev_notify; + union { +- int32_t _pad[ARRAY_SIZE(((struct sigevent *)0)->_sigev_un._pad)]; ++ int32_t _pad[TARGET_SIGEV_PAD_SIZE]; + int32_t _tid; + + struct { +-- +1.9.2 + diff --git a/main/qemu/0002-util-qemu-openpty-fix-build-with-musl-libc-by-includ.patch b/main/qemu/0002-util-qemu-openpty-fix-build-with-musl-libc-by-includ.patch new file mode 100644 index 000000000..a11df7a83 --- /dev/null +++ b/main/qemu/0002-util-qemu-openpty-fix-build-with-musl-libc-by-includ.patch @@ -0,0 +1,42 @@ +From 48fbea622a77f38a0fb33e862486d4c70eb8cf66 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 29 Apr 2014 10:14:57 +0200 +Subject: [PATCH 2/6] util/qemu-openpty: fix build with musl libc by include + termios.h as fallback + +Include termios.h as POSIX fallback when not glibc, bsd or solaris. +POSIX says that termios.h should define struct termios and TCAFLUSH. +http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html + +This fixes the following compile errors with musl libc: + +util/qemu-openpty.c: In function 'qemu_openpty_raw': +util/qemu-openpty.c:112:20: error: storage size of 'tty' isn't known + struct termios tty; + ^ +... +util/qemu-openpty.c:128:24: error: 'TCSAFLUSH' undeclared (first use in this function) + tcsetattr(*aslave, TCSAFLUSH, &tty); + ^ + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + util/qemu-openpty.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/util/qemu-openpty.c b/util/qemu-openpty.c +index 4febfe9..4c53211 100644 +--- a/util/qemu-openpty.c ++++ b/util/qemu-openpty.c +@@ -47,6 +47,8 @@ + #elif defined CONFIG_SOLARIS + # include <termios.h> + # include <stropts.h> ++#else ++# include <termios.h> + #endif + + #ifdef __sun__ +-- +1.9.2 + diff --git a/main/qemu/0003-xen-replace-ffsl-with-ctzl.patch b/main/qemu/0003-xen-replace-ffsl-with-ctzl.patch new file mode 100644 index 000000000..63d7de95e --- /dev/null +++ b/main/qemu/0003-xen-replace-ffsl-with-ctzl.patch @@ -0,0 +1,32 @@ +From a8f26948d36c27243fd564e9af59ebf416838311 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 29 Apr 2014 14:28:52 +0200 +Subject: [PATCH 3/6] xen: replace ffsl with ctzl + +ffsl is a GNU extension and not available in musl libc. + +See also commit fbeadf50 (bitops: unify bitops_ffsl with the one in +host-utils.h, call it bitops_ctzl) on why ctzl should be used instead +of ffsl. + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + xen-all.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xen-all.c b/xen-all.c +index ba34739..3a0e9e5 100644 +--- a/xen-all.c ++++ b/xen-all.c +@@ -511,7 +511,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state, + for (i = 0; i < ARRAY_SIZE(bitmap); i++) { + unsigned long map = bitmap[i]; + while (map != 0) { +- j = ffsl(map) - 1; ++ j = ctzl(map); + map &= ~(1ul << j); + memory_region_set_dirty(framebuffer, + (i * width + j) * TARGET_PAGE_SIZE, +-- +1.9.2 + diff --git a/main/qemu/0004-vhost-replace-ffsl-with-ctzl.patch b/main/qemu/0004-vhost-replace-ffsl-with-ctzl.patch new file mode 100644 index 000000000..3853dd5a7 --- /dev/null +++ b/main/qemu/0004-vhost-replace-ffsl-with-ctzl.patch @@ -0,0 +1,49 @@ +From f5fba0976a2841e2f4033a01076161ce2ede0477 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 29 Apr 2014 14:34:12 +0200 +Subject: [PATCH 4/6] vhost: replace ffsl with ctzl + +Avoid using the GNU extesion ffsl which is not implemented in musl libc. + +The atomic_xchg() means we know that vhost_log_chunk_t will never be +larger than the 'long' type, so ctzl() is always sufficient. + +See also commit fbeadf50 (bitops: unify bitops_ffsl with the one in +host-utils.h, call it bitops_ctzl) on why ctzl should be used instead +of ffsl. + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + hw/virtio/vhost.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c +index 9e336ad..f62cfaf 100644 +--- a/hw/virtio/vhost.c ++++ b/hw/virtio/vhost.c +@@ -41,7 +41,6 @@ static void vhost_dev_sync_region(struct vhost_dev *dev, + + for (;from < to; ++from) { + vhost_log_chunk_t log; +- int bit; + /* We first check with non-atomic: much cheaper, + * and we expect non-dirty to be the common case. */ + if (!*from) { +@@ -51,12 +50,11 @@ static void vhost_dev_sync_region(struct vhost_dev *dev, + /* Data must be read atomically. We don't really need barrier semantics + * but it's easier to use atomic_* than roll our own. */ + log = atomic_xchg(from, 0); +- while ((bit = sizeof(log) > sizeof(int) ? +- ffsll(log) : ffs(log))) { ++ while (log) { ++ int bit = ctzl(log); + hwaddr page_addr; + hwaddr section_offset; + hwaddr mr_offset; +- bit -= 1; + page_addr = addr + bit * VHOST_LOG_PAGE; + section_offset = page_addr - section->offset_within_address_space; + mr_offset = section_offset + section->offset_within_region; +-- +1.9.2 + diff --git a/main/qemu/0005-exec-replace-ffsl-with-ctzl.patch b/main/qemu/0005-exec-replace-ffsl-with-ctzl.patch new file mode 100644 index 000000000..d4781ab64 --- /dev/null +++ b/main/qemu/0005-exec-replace-ffsl-with-ctzl.patch @@ -0,0 +1,32 @@ +From 235699fab03b8e60358863bae9e9c9aeea978189 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 29 Apr 2014 14:41:19 +0200 +Subject: [PATCH 5/6] exec: replace ffsl with ctzl + +See commit fbeadf50 (bitops: unify bitops_ffsl with the one in +host-utils.h, call it bitops_ctzl) on why ctzl should be used instead +of ffsl. + +This is also needed for musl libc which does not implement ffsl. + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + include/exec/ram_addr.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h +index 2edfa96..b94de02 100644 +--- a/include/exec/ram_addr.h ++++ b/include/exec/ram_addr.h +@@ -117,7 +117,7 @@ static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, + if (bitmap[i] != 0) { + c = leul_to_cpu(bitmap[i]); + do { +- j = ffsl(c) - 1; ++ j = ctzl(c); + c &= ~(1ul << j); + page_number = (i * HOST_LONG_BITS + j) * hpratio; + addr = page_number * TARGET_PAGE_SIZE; +-- +1.9.2 + diff --git a/main/qemu/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch b/main/qemu/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch new file mode 100644 index 000000000..7ea1dba6d --- /dev/null +++ b/main/qemu/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch @@ -0,0 +1,37 @@ +From 3e231fa7a2dc66e2ef06ac44f4f719b08fc0c67e Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Tue, 29 Apr 2014 15:51:31 +0200 +Subject: [PATCH 6/6] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU + platforms + +The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available +on all platforms, so we define those if they are missing. + +This is needed for musl libc. + +Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> +--- + linux-user/signal.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/linux-user/signal.c b/linux-user/signal.c +index 7d6246f..6019dbb 100644 +--- a/linux-user/signal.c ++++ b/linux-user/signal.c +@@ -32,6 +32,13 @@ + + //#define DEBUG_SIGNAL + ++#ifndef __SIGRTMIN ++#define __SIGRTMIN 32 ++#endif ++#ifndef __SIGRTMAX ++#define __SIGRTMAX (NSIG-1) ++#endif ++ + static struct target_sigaltstack target_sigaltstack_used = { + .ss_sp = 0, + .ss_size = 0, +-- +1.9.2 + diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD index e444ff8a8..81f688fd0 100644 --- a/main/qemu/APKBUILD +++ b/main/qemu/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=qemu pkgver=2.0.0 -pkgrel=0 +pkgrel=1 pkgdesc="QEMU is a generic machine emulator and virtualizer" url="http://qemu.org/" arch="all" @@ -73,11 +73,14 @@ $pkgname-guest-agent:guest " source="http://wiki.qemu-project.org/download/qemu-$pkgver.tar.bz2 0001-elfload-load-PIE-executables-to-right-address.patch - qemu-170-ffsl.patch - qemu-170-ffsll.patch - qemu-170-openpty.patch - qemu-170-sigset_t.patch - sigev_pad.patch + 0001-linux-user-avoid-using-glibc-internals-in-_syscall5-.patch + 0002-util-qemu-openpty-fix-build-with-musl-libc-by-includ.patch + 0003-xen-replace-ffsl-with-ctzl.patch + 0004-vhost-replace-ffsl-with-ctzl.patch + 0005-exec-replace-ffsl-with-ctzl.patch + 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch + + musl-F_SHLCK-and-F_EXLCK.patch qemu-guest-agent.confd qemu-guest-agent.initd @@ -104,13 +107,6 @@ prepare() { build() { cd "$srcdir"/$pkgname-$pkgver - if [ "x$CLIBC" = "xmusl" ]; then - CFLAGS="$CFLAGS -D_GNU_SOURCE -Dflock64=flock" - CFLAGS="$CFLAGS -DF_EXLCK=4 -DF_SHLCK=8" - CFLAGS="$CFLAGS -D__SIGRTMIN=32 -D__SIGRTMAX=\(NSIG-1\)" - else - CFLAGS="$CFLAGS -DHAVE_FFSLL -DHAVE_FFSL" - fi ./configure \ --prefix=/usr \ --localstatedir=/var \ @@ -130,6 +126,7 @@ build() { --disable-bsd-user \ --enable-linux-user \ --disable-werror \ + --disable-smartcard-nss \ --cc="${CC:-gcc}" \ || return 1 @@ -242,31 +239,37 @@ guest() { md5sums="2790f44fd76da5de5024b4aafeb594c2 qemu-2.0.0.tar.bz2 672727bb1d8c8ab7b5def65dd1793c33 0001-elfload-load-PIE-executables-to-right-address.patch -a51a526312535019de143f2e6a54e3ce qemu-170-ffsl.patch -78f4d1b13ddee47887b6d59378e8e44e qemu-170-ffsll.patch -6589d3ba6975d245feefa0ad436eed76 qemu-170-openpty.patch -f5e8ee9c5cd1ebc37194f3c151f420a8 qemu-170-sigset_t.patch -3fed185b1f49f9da4fd1011cba8122fb sigev_pad.patch +9e13b70bb154e4bba9b7bc55565bd671 0001-linux-user-avoid-using-glibc-internals-in-_syscall5-.patch +d5bee57e71a84b3b1d34a7a6877c710a 0002-util-qemu-openpty-fix-build-with-musl-libc-by-includ.patch +a5b3f6d9f1b12d548fec1c0f26656d2a 0003-xen-replace-ffsl-with-ctzl.patch +61de41ce733bc63c4ebb05b0475c9b3f 0004-vhost-replace-ffsl-with-ctzl.patch +3d5271c1ead506b10dfd25a1ea08be39 0005-exec-replace-ffsl-with-ctzl.patch +d364208c4847ad2baeb237900befecd1 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch +bc5f2e41ed3b6d6d30b672adab82e3e1 musl-F_SHLCK-and-F_EXLCK.patch 1663bc6977f6886a58394155b1bf3676 qemu-guest-agent.confd 2035cd781ea810e94bda250c609d8d90 qemu-guest-agent.initd 66660f143235201249dc0648b39b86ee 80-kvm.rules" sha256sums="60cc1aa0cad39cec891f970bed60ca8a484f071adad4943123599ac223543a3b qemu-2.0.0.tar.bz2 af35304b165622a53f7557b59ffd8da5030f5fd444e669c862f9410131f3b987 0001-elfload-load-PIE-executables-to-right-address.patch -63adefe8f34a6859e5f7a1e2de49538267c93955231ef0c4c2bfd6de919711e0 qemu-170-ffsl.patch -373ca5c783913645c6fc6c4c3b7740b0cc011aeed30bc8b848d5b26cf5d81070 qemu-170-ffsll.patch -6cffdccc3e270e7ab65701cc4e68692b577540f02763b14c66bf2225edb20f8b qemu-170-openpty.patch -fbc907e09c04110992a75bd4cc2f74fbc33e5b4a1cf0ebaa51c2a1dc4512ce5c qemu-170-sigset_t.patch -35f082690682229166641640d1abeaabfe67ad61b829ab62d94ccb3ef0aaea81 sigev_pad.patch +710d2060e8faa3025f8bca608d7e28cbe498ef7ce3735bf005f763f3a97aa623 0001-linux-user-avoid-using-glibc-internals-in-_syscall5-.patch +797ccc6c7fcc01c66ce13c2f32f0fa0dd7ff4deb4e0b6518fda39fb0bb3a9a46 0002-util-qemu-openpty-fix-build-with-musl-libc-by-includ.patch +58879543cdc595409f07e588faf05d8526b9d40d3fbc71f2633714f48bf544a9 0003-xen-replace-ffsl-with-ctzl.patch +1347fd3aa48aa46a51cc01781cbfe0169fd198845304e80eb4a2285792a0f516 0004-vhost-replace-ffsl-with-ctzl.patch +03fb8cd1b7576ccb9f606ec5a3fcd1c94a9e983ba342a18e648e4bf404e1d993 0005-exec-replace-ffsl-with-ctzl.patch +6af6cf9044997710a6d0fbdba30a35c8d775e30d30c032ec97db672f75ec88ac 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch +eefd597197223899d3b12d8274af493153e270fd06ea8622e33d6eaeae063d40 musl-F_SHLCK-and-F_EXLCK.patch d84e53a94584f37f3bd1b21f44077b5de0d07094c6729f26ae20ab1f7b9cc298 qemu-guest-agent.confd 982fa8ba67c728405305e4cf5a36a41a780b3d1f388ebd6377e7964c271a1c92 qemu-guest-agent.initd 37f666f1cdb7d8a62171de69b531681dcb0fba74236729dac8b6c019232eba84 80-kvm.rules" sha512sums="8fe2e8faa66251aaea7d6017ee71675d5b05f93f92be7e2ad3e1d02af185b3d6c4069bd83a13fb1e35a3e8947aff76f22446b395f97ac18b6f7a99744202e3fa qemu-2.0.0.tar.bz2 405008589cad1c8b609eca004d520bf944366e8525f85a19fc6e283c95b84b6c2429822ba064675823ab69f1406a57377266a65021623d1cd581e7db000134fd 0001-elfload-load-PIE-executables-to-right-address.patch -13ac2ba2835764ad97d55dc62313a4626a4e4e12a5f932d26b8579101bd875411faf9ffd5642c94e7b8da7d41b5ca48507c3a08ce4d087b8306110e23206877e qemu-170-ffsl.patch -80168f5eadb518dbae8277cc2ff78cc494783e2180dfbf78d7b5c068c3efecd0bbb3d61dfb0079e365c632c1a80b82d6955de9718ff0b8e8613a52407bd5a2af qemu-170-ffsll.patch -b2cbb121c8ac85ee0aff835ecff59e2b4e886ddb9c5084286eaf735b5a3868043dad36e5e2289b6e6505bca4cfe971c9a35109a3638357d4b5b10168f921c984 qemu-170-openpty.patch -d867db00b0ac83c8dabd45c9ef0f07559f1f2045f3a4b7fd507a1ee276325e693f772b22511e2d5e1fce866de0ef4cd9da057119cfc39b905471a8995b36619e qemu-170-sigset_t.patch -51e66ac6eb649a165e5633c00d295740dc11f73ffa7567931b7d416f210154c2a51eb4b967c6d849ad9f6b19581c8e452b32da55f05982de37de7b8ce3c1edae sigev_pad.patch +8c6a4b7aee138566d6a47df4a58f85a657099c7ec101fac825f81aa264e275bf2e00d264d55f0f91ff3be2da78e7e306aaa031a0997728381bafb6f4b79c674a 0001-linux-user-avoid-using-glibc-internals-in-_syscall5-.patch +c9c91116e30868180fab2780e947de72ab338ef5173b86457e6e0ffcc20eda30743867a2fcb7dae788aa36d3bdf5c4058d06332e3adc611ab30d1b5bc4dff081 0002-util-qemu-openpty-fix-build-with-musl-libc-by-includ.patch +b9a4e0012f574491debb9c1428240402a223ff772ceff662826fbc821c9cbfe3db368b8a12b8742cfda98b536c6130e289f63cfcf8deff933e9b7bb3ad54ecdc 0003-xen-replace-ffsl-with-ctzl.patch +49078967718b338adc1c445921012d5363af83fddee317a23b8c121a73b127ef7f8014cca1cfdc91c927ffa02f7091712753a19314c6ef28462b77f494025cb1 0004-vhost-replace-ffsl-with-ctzl.patch +9504cc6afa84e5cc687baac2e7f1e4c2dbeee0f67dd8963686c89d0dc9e96eef0228a2390722b813f14dc359ab746227e8494192f5effbe9e8353c991dcbdcc3 0005-exec-replace-ffsl-with-ctzl.patch +ec84b27648c01c6e58781295dcd0c2ff8e5a635f9836ef50c1da5d0ed125db1afc4cb5b01cb97606d6dd8f417acba93e1560d9a32ca29161a4bb730b302440ea 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch +5de10f7e8abae16d1d7521e5ca1bfb62a8f295b324bea84f122f882b7b9354c21e5a00b20a1c5484c1b737b937e53c4ca6979e55705522f0779a5669725369f5 musl-F_SHLCK-and-F_EXLCK.patch d90c034cae3f9097466854ed1a9f32ab4b02089fcdf7320e8f4da13b2b1ff65067233f48809911485e4431d7ec1a22448b934121bc9522a2dc489009e87e2b1f qemu-guest-agent.confd 761b4e2397569dae45ae3bb9e46e28746275297f629af9e9065525497fd26a48b65d8abcf4282727afd35309e338967acf6a1b14c3169577bdc16c1f42e618b3 qemu-guest-agent.initd 9b7a89b20fcf737832cb7b4d5dc7d8301dd88169cbe5339eda69fbb51c2e537d8cb9ec7cf37600899e734209e63410d50d0821bce97e401421db39c294d97be2 80-kvm.rules" diff --git a/main/qemu/musl-F_SHLCK-and-F_EXLCK.patch b/main/qemu/musl-F_SHLCK-and-F_EXLCK.patch new file mode 100644 index 000000000..92157a776 --- /dev/null +++ b/main/qemu/musl-F_SHLCK-and-F_EXLCK.patch @@ -0,0 +1,21 @@ +This patch was not upstreamed to qemu as those should probably be +defined in musl libc. + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index c8989b6..00ed747 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -114,6 +114,13 @@ int __clone2(int (*fn)(void *), void *child_stack_base, + + #include "qemu.h" + ++#ifndef F_SHLCK ++#define F_SHLCK 8 ++#endif ++#ifndef F_EXLCK ++#define F_EXLCK 4 ++#endif ++ + #define CLONE_NPTL_FLAGS2 (CLONE_SETTLS | \ + CLONE_PARENT_SETTID | CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID) + diff --git a/main/qemu/qemu-170-ffsl.patch b/main/qemu/qemu-170-ffsl.patch deleted file mode 100644 index 5da3d07ee..000000000 --- a/main/qemu/qemu-170-ffsl.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- qemu-1.7.0.org/kvm-all.c -+++ qemu-1.7.0/kvm-all.c -@@ -374,6 +374,19 @@ - return 0; - } - -+#ifndef HAVE_FFSL -+#include <limits.h> -+#if ULONG_MAX == UINT_MAX -+#define ffsl(X) ffs(X) -+#else -+static int ffsl(long i) { -+ unsigned long x = i & -i; -+ if (x <= 0xffffffff) return ffs (i); -+ else return 32 + ffs (i >> 32); -+} -+#endif -+#endif -+ - /* get kvm's dirty pages bitmap and update qemu's */ - static int kvm_get_dirty_pages_log_range(MemoryRegionSection *section, - unsigned long *bitmap) diff --git a/main/qemu/qemu-170-ffsll.patch b/main/qemu/qemu-170-ffsll.patch deleted file mode 100644 index c5a66426b..000000000 --- a/main/qemu/qemu-170-ffsll.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- qemu-1.7.0.org/hw/virtio/vhost.c -+++ qemu-1.7.0/hw/virtio/vhost.c -@@ -22,6 +22,15 @@ - #include "exec/address-spaces.h" - #include "hw/virtio/virtio-bus.h" - -+#ifndef HAVE_FFSLL -+static int ffsll(long long i) { -+ unsigned long long x = i & -i; -+ if (x <= 0xffffffff) return ffs (i); -+ else return 32 + ffs (i >> 32); -+} -+#endif -+ -+ - static void vhost_dev_sync_region(struct vhost_dev *dev, - MemoryRegionSection *section, - uint64_t mfirst, uint64_t mlast, diff --git a/main/qemu/qemu-170-openpty.patch b/main/qemu/qemu-170-openpty.patch deleted file mode 100644 index 3a0d051bd..000000000 --- a/main/qemu/qemu-170-openpty.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qemu-1.7.0.org/util/qemu-openpty.c -+++ qemu-1.7.0/util/qemu-openpty.c -@@ -47,6 +47,8 @@ - #elif defined CONFIG_SOLARIS - # include <termios.h> - # include <stropts.h> -+#else -+# include <termios.h> - #endif - - #ifdef __sun__ diff --git a/main/qemu/qemu-170-sigset_t.patch b/main/qemu/qemu-170-sigset_t.patch deleted file mode 100644 index 90bcdddbc..000000000 --- a/main/qemu/qemu-170-sigset_t.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qemu-1.7.0.org/linux-user/syscall.c -+++ qemu-1.7.0/linux-user/syscall.c -@@ -400,7 +400,7 @@ - #endif - #define __NR_sys_ppoll __NR_ppoll - _syscall5(int, sys_ppoll, struct pollfd *, fds, nfds_t, nfds, -- struct timespec *, timeout, const __sigset_t *, sigmask, -+ struct timespec *, timeout, const sigset_t *, sigmask, - size_t, sigsetsize) - #endif - diff --git a/main/qemu/sigev_pad.patch b/main/qemu/sigev_pad.patch deleted file mode 100644 index 19f2cec09..000000000 --- a/main/qemu/sigev_pad.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- ./linux-user/syscall_defs.h.orig -+++ ./linux-user/syscall_defs.h -@@ -2552,12 +2552,14 @@ - abi_ulong ptr; - }; - -+#define SIGEV_PAD_ARRAY_SIZE ARRAY_SIZE(((struct sigevent *)0)->__pad) -+ - struct target_sigevent { - target_sigval_t sigev_value; - int32_t sigev_signo; - int32_t sigev_notify; - union { -- int32_t _pad[ARRAY_SIZE(((struct sigevent *)0)->_sigev_un._pad)]; -+ int32_t _pad[SIGEV_PAD_ARRAY_SIZE]; - int32_t _tid; - - struct { |