summaryrefslogtreecommitdiff
path: root/lib/pixman
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-07-17 19:27:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-07-17 19:27:23 +0000
commita0440f6ba87e18d8871f0abbbf6938a56389b7ad (patch)
treedbaa48d7bab16238274598d2f59d355ce29229fd /lib/pixman
parentf8a48ea8ebff3562fca0fb7da8404db5d794b59a (diff)
Do not blindly use __builtin_clz() #ifdef __GNUC__, but only if gcc >= 3.4 for
it did not exist in previous releases. ok matthieu@
Diffstat (limited to 'lib/pixman')
-rw-r--r--lib/pixman/pixman/pixman-matrix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pixman/pixman/pixman-matrix.c b/lib/pixman/pixman/pixman-matrix.c
index 89b96826b..cacc05cc8 100644
--- a/lib/pixman/pixman/pixman-matrix.c
+++ b/lib/pixman/pixman/pixman-matrix.c
@@ -37,7 +37,8 @@
static force_inline int
count_leading_zeros (uint32_t x)
{
-#ifdef __GNUC__
+#if defined(__GNUC__) && \
+ (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
return __builtin_clz (x);
#else
int n = 0;