From ea6ed46fc273a7b10870caeb515622737eb1c572 Mon Sep 17 00:00:00 2001 From: Dmitrii Rodionov Date: Wed, 18 Apr 2018 12:20:56 +0300 Subject: Wrap likely/unlikely macroses with #ifndef It prevent redefine error when project using lz4 has its own likely/unlikely macroses. --- lib/lz4.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/lz4.c b/lib/lz4.c index 0ce05da..1e96931 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -147,8 +147,12 @@ # define expect(expr,value) (expr) #endif +#ifndef likely #define likely(expr) expect((expr) != 0, 1) +#endif +#ifndef unlikely #define unlikely(expr) expect((expr) != 0, 0) +#endif /*-************************************ -- cgit v0.12