aboutsummaryrefslogtreecommitdiff
path: root/include/types.h
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-05-09 20:02:32 +0200
committerhexcoder- <heiko@hexco.de>2020-05-09 20:02:32 +0200
commit20392878f10987709b4d3223a0120edb352cbcf5 (patch)
tree12308093627a9c46b7935ea48899b7b8454a3bb7 /include/types.h
parent102067d43d7476997b2ffd6faceae4510f753d89 (diff)
downloadAFLplusplus-20392878f10987709b4d3223a0120edb352cbcf5.tar.gz
qemu_mode: make building warning free
Diffstat (limited to 'include/types.h')
-rw-r--r--include/types.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/types.h b/include/types.h
index e7ff131d..647044c4 100644
--- a/include/types.h
+++ b/include/types.h
@@ -154,15 +154,19 @@ typedef int64_t s64;
#define MEM_BARRIER() __asm__ volatile("" ::: "memory")
#if __GNUC__ < 6
-#define likely(_x) (_x)
-#define unlikely(_x) (_x)
+# ifndef likely
+# define likely(_x) (_x)
+# endif
+# ifndef unlikely
+# define unlikely(_x) (_x)
+# endif
#else
-#ifndef likely
-#define likely(_x) __builtin_expect(!!(_x), 1)
-#endif
-#ifndef unlikely
-#define unlikely(_x) __builtin_expect(!!(_x), 0)
-#endif
+# 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 */