From 312c8bea660744efd0ff21acb19925d1e8321dd4 Mon Sep 17 00:00:00 2001 From: EatingSumo <877730493@qq.com> Date: Mon, 16 Sep 2024 13:17:28 +0000 Subject: [PATCH] libweston/screenshooter: Fix build when __builtin_clz is not available Fix compilation error when `__builtin_clz` is not available by renaming variable 'u' to 'run' Signed-off-by: Junyu Long <877730493@qq.com> --- libweston/screenshooter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/screenshooter.c b/libweston/screenshooter.c index f5d46ceb2..8b11e3484 100644 --- a/libweston/screenshooter.c +++ b/libweston/screenshooter.c @@ -265,7 +265,7 @@ output_run(uint32_t *p, uint32_t delta, int run) #if defined(HAVE_BUILTIN_CLZ) i = 24 - __builtin_clz(run); #else - for (i = 0, tmp = u >> 8; tmp; i++, tmp >>= 1); + for (i = 0, tmp = run >> 8; tmp; i++, tmp >>= 1); #endif *p++ = delta | ((i + 0xe0) << 24); run -= 1 << (7 + i);