changeset 22392:abbd57ae531d

lib/bits.h: Fix compiling with gcc 3.0 .. 3.3 According to gcc's online manuals, 3.4 is the first version with __builtin_clzll
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 21 Jun 2017 16:14:14 +0300
parents e8bf64a8bb8f
children 7f042673da58
files src/lib/bits.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/bits.h	Sun Jul 30 09:39:18 2017 +0300
+++ b/src/lib/bits.h	Wed Jun 21 16:14:14 2017 +0300
@@ -15,7 +15,7 @@
 	return num > 0 && (num & (num - 1)) == 0;
 }
 
-#if __GNUC__ > 2
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
 static inline unsigned int ATTR_CONST
 bits_required32(uint32_t num)
 {