On 10/16/10 21:32, Blue Swirl wrote: > On Sat, Oct 16, 2010 at 4:04 PM, <jes.soren...@redhat.com> wrote: >> From: Jes Sorensen <jes.soren...@redhat.com> >> >> In addition add sysemu.h includes to file requiring a prototype for >> ffs() > > There are probably a lot more files which would need that: > /src/qemu/hw/sd.c: In function 'sd_normal_command': > /src/qemu/hw/sd.c:738:13: error: implicit declaration of function > 'ffs' [-Werror=implicit-function-declaration] > /src/qemu/hw/max7310.c: In function 'max7310_tx': > /src/qemu/hw/max7310.c:94:13: error: implicit declaration of function > 'ffs' [-Werror=implicit-function-declaration] > /src/qemu/hw/unin_pci.c: In function 'unin_get_config_reg': > /src/qemu/hw/unin_pci.c:101:9: error: implicit declaration of function > 'ffs' [-Werror=implicit-function-declaration] > > Perhaps the prototype should be added someplace else.
I guess we'll have to bite the bullet. I don't really like it, but I moved it to qemu-common.h to be consistent with the POSIX code. POSIX relies on ffs() to be provided by strings.h which we include in qemu-common.h Should build (I hope) in the next patch. I tried building arm-softmmu here but it wouldn't build for me at all due to other things so I couldn't test it. Cheers, Jes