From 0746e6841a2ad3202deaa89dcd01100a4f1df88b Mon Sep 17 00:00:00 2001 From: stefan11111 Date: Mon, 23 Jun 2025 14:27:10 +0300 Subject: [PATCH] xfree86: compat: fix Ones for compilers where __builtin_popcountl is missing Signed-off-by: stefan11111 --- hw/xfree86/compat/ones.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/xfree86/compat/ones.c b/hw/xfree86/compat/ones.c index 7e2dce864..37f724a2f 100644 --- a/hw/xfree86/compat/ones.c +++ b/hw/xfree86/compat/ones.c @@ -27,7 +27,6 @@ Ones(unsigned long mask) y = (mask >> 1) & 033333333333; y = mask - y - ((y >> 1) & 033333333333); - /* x & 077 == x % 077 */ - return (((y + (y >> 3)) & 030707070707) & 077); + return (((y + (y >> 3)) & 030707070707) % 077); #endif }