about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-03-28 13:05:26 +0100
committerDominik Maier <domenukk@gmail.com>2020-04-01 13:10:06 +0200
commitcda56ca129c036605b848d24c33edd4a00760c2d (patch)
tree2cb5bd103e6165dbeb4e584d0b8ce590c87c831b
parentab5e0703dab404a77cd4726f720db99bed1a0c71 (diff)
downloadafl++-cda56ca129c036605b848d24c33edd4a00760c2d.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 */