about summary refs log tree commit diff
path: root/types.h
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-07-16 08:51:00 +0200
committervan Hauser <vh@thc.org>2019-07-16 08:51:00 +0200
commit995eb0cd7972e2179ea9fe727d3c89d0b552c111 (patch)
tree15bcfb9c413641845310f4ba9cd90592edbcb406 /types.h
parent9f079658769a0edb775006ba5088cb7fcc3f89e6 (diff)
downloadafl++-995eb0cd7972e2179ea9fe727d3c89d0b552c111.tar.gz
deprecate afl-gcc
Diffstat (limited to 'types.h')
-rw-r--r--types.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/types.h b/types.h
index 784d3a7a..3497bb2b 100644
--- a/types.h
+++ b/types.h
@@ -80,7 +80,12 @@ typedef int64_t  s64;
 #define MEM_BARRIER() \
   asm volatile("" ::: "memory")
 
-#define likely(_x)   __builtin_expect(!!(_x), 1)
-#define unlikely(_x)  __builtin_expect(!!(_x), 0)
+#if __GNUC__ < 6
+ #define likely(_x)   (_x)
+ #define unlikely(_x) (_x)
+#else
+ #define likely(_x)   __builtin_expect(!!(_x), 1)
+ #define unlikely(_x)  __builtin_expect(!!(_x), 0)
+#endif
 
 #endif /* ! _HAVE_TYPES_H */