about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-03-28 13:05:26 +0100
committerhexcoder- <heiko@hexco.de>2020-03-28 13:05:26 +0100
commit8b8600fdabb20c344063ead1b0ff2d105e0365be (patch)
tree2cb5bd103e6165dbeb4e584d0b8ce590c87c831b
parent6ac40e2cc5edab506d716e33f0cba356690a30c6 (diff)
downloadafl++-8b8600fdabb20c344063ead1b0ff2d105e0365be.tar.gz
types.h: silence some compiler warnings regarding redeclaration of
likely/unlikely
-rw-r--r--include/types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/types.h b/include/types.h
index bd4bd05d..ebc561f7 100644
--- a/include/types.h
+++ b/include/types.h
@@ -120,9 +120,13 @@ typedef int64_t s64;
 #define likely(_x) (_x)
 #define unlikely(_x) (_x)
 #else
+#ifndef likely
 #define likely(_x) __builtin_expect(!!(_x), 1)
+#endif
+#ifndef unlikely
 #define unlikely(_x) __builtin_expect(!!(_x), 0)
 #endif
+#endif
 
 #endif                                                   /* ! _HAVE_TYPES_H */