Index: uspace/lib/c/generic/bitops.c
===================================================================
--- uspace/lib/c/generic/bitops.c	(revision fa24efa71b4a16342f94d5f63ee75d9242a727c6)
+++ uspace/lib/c/generic/bitops.c	(revision f3287e556d8774e8a920fcac5e1178e47a7caad4)
@@ -33,7 +33,13 @@
 #include <bitops.h>
 
-extern int __popcountsi2(int a)
+int __popcountsi2(int a)
 {
-	return __builtin_popcount(a);
+	int bits = 0;
+	for (unsigned int i = 0; i < sizeof(a) * 8; i++)	 {
+		if (((a >> i) & 1) != 0) {
+			bits++;
+		}
+	}
+	return bits;									
 }
 
