On 12/12/2012 06:46 AM, Paolo Bonzini wrote:
> We can provide fast versions based on the other functions defined
> by host-utils.h.  Some care is required on glibc, which provides
> ffsl already.
> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  host-utils.h | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)

Reviewed-by: Eric Blake <ebl...@redhat.com>

> 
> diff --git a/host-utils.h b/host-utils.h
> index 821db93..231d580 100644
> --- a/host-utils.h
> +++ b/host-utils.h
> @@ -24,6 +24,7 @@
>   */
>  
>  #include "compiler.h"   /* QEMU_GNUC_PREREQ */
> +#include <string.h>     /* ffsl */

I never really understood why ffs() is in <strings.h> but ffsl() is in
<string.h>, especially when neither function deals with strings (a
<bitops.h> header would have made more sense), but such is life.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to