Message ID | 1398781051-16207-3-git-send-email-ncopa@alpinelinux.org |
---|---|
State | New |
Headers | show |
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,
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(-)