summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-05 13:13:02 -0800
committerJunio C Hamano <gitster@pobox.com>2015-03-05 13:13:02 -0800
commitabfed73ce8890db85e1a5851b4678321b0d1e8cc (patch)
tree7c8fb5915082e088526afc4fb24e0d9de0c8c4e3
parent2250406bfdf8d9d890f53b651868363a304a7701 (diff)
parentbd4e8822da3bf6ce28a0c5f7c1bbf1b6341c0586 (diff)
downloadgit-abfed73ce8890db85e1a5851b4678321b0d1e8cc.tar.gz
Merge branch 'jk/pack-bitmap' into maint
The pack bitmap support did not build with older versions of GCC. * jk/pack-bitmap: ewah: fix building with gcc < 3.4.0
-rw-r--r--ewah/ewok.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ewah/ewok.h b/ewah/ewok.h
index f6ad190a03..13c6e20412 100644
--- a/ewah/ewok.h
+++ b/ewah/ewok.h
@@ -47,7 +47,8 @@ static inline uint32_t ewah_bit_popcount64(uint64_t x)
return (x * 0x0101010101010101ULL) >> 56;
}
-#ifdef __GNUC__
+/* __builtin_ctzll was not available until 3.4.0 */
+#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR > 3))
#define ewah_bit_ctz64(x) __builtin_ctzll(x)
#else
static inline int ewah_bit_ctz64(uint64_t x)