$OpenBSD: patch-timsort_h,v 1.5 2017/11/08 06:51:35 steven Exp $
Index: timsort.h
--- timsort.h.orig
+++ timsort.h
@@ -74,7 +74,7 @@ typedef unsigned __int64 uint64_t;
 static int compute_minrun(const uint64_t);
 
 #ifndef CLZ
-#ifdef __GNUC__
+#if defined (__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
 #define CLZ __builtin_clzll
 #else
 
