diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-12-23 10:03:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-03-25 10:04:49 +0000 |
commit | d6030c90385b3ae512d508279c9f5a4cc5fa3cdb (patch) | |
tree | 6ad08bbaa7b35c1c48c36d83aa6e08436f48bb86 /main/qemu/qemu-170-ffsll.patch | |
parent | cbcb5fe127fec41c7623360c03fc78df445c3a54 (diff) | |
download | aports-d6030c90385b3ae512d508279c9f5a4cc5fa3cdb.tar.bz2 aports-d6030c90385b3ae512d508279c9f5a4cc5fa3cdb.tar.xz |
main/qemu: musl build fix
Diffstat (limited to 'main/qemu/qemu-170-ffsll.patch')
-rw-r--r-- | main/qemu/qemu-170-ffsll.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/main/qemu/qemu-170-ffsll.patch b/main/qemu/qemu-170-ffsll.patch new file mode 100644 index 0000000000..c5a66426b9 --- /dev/null +++ b/main/qemu/qemu-170-ffsll.patch @@ -0,0 +1,18 @@ +--- 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, |