summaryrefslogtreecommitdiff
path: root/src/mesa/main/imports.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2010-04-19 09:32:37 -0600
committerBrian Paul <brianp@vmware.com>2010-04-19 09:33:53 -0600
commitcf7d08b4434325220488d4c9e871e230bafd7b7c (patch)
tree31e2a3a0dfc256dd418c21da937abfd0980b91b7 /src/mesa/main/imports.c
parentf4553d99c63e4bcb4d023c9e33b72fedd0dfbdc1 (diff)
mesa: Fix build with gcc 3.3.
Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/main/imports.c')
-rw-r--r--src/mesa/main/imports.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 1ae0853364..b1389b25f2 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -564,7 +564,8 @@ _mesa_ffsll(int64_t val)
unsigned int
_mesa_bitcount(unsigned int n)
{
-#if defined(__GNUC__)
+#if defined(__GNUC__) && \
+ ((_GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
return __builtin_popcount(n);
#else
unsigned int bits;