summaryrefslogtreecommitdiff
path: root/src/decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/decode.c b/src/decode.c
index 4efbee3..886228b 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -322,7 +322,10 @@ static inline uint32_t direct_get_fs(struct aec_stream *strm)
state->bitp = 56;
}
-#if HAVE_DECL___BUILTIN_CLZLL
+#ifndef __has_builtin
+#define __has_builtin(x) 0 /* Compatibility with non-clang compilers. */
+#endif
+#if HAVE_DECL___BUILTIN_CLZLL || __has_builtin(__builtin_clzll)
i = 63 - __builtin_clzll(state->acc);
#elif HAVE_BSR64
_BitScanReverse64(&i, state->acc);