summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index fd81bec9..1532131a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -193,4 +193,13 @@
#define LOG_CREAT 1
#define LOG_VF 2
+
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
+ #define __builtin_expect(exp,c) (exp)
+
+#endif
+
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+
#endif