From 7731cef782bbf53dc1f23b65f852ab50fb254ffa Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sun, 30 Sep 2012 16:18:10 +0200 Subject: [PATCH] pf-ring: protect definition of (un)likely This patch makes (un)likely declared if and only if they are not declared before. --- src/util-optimize.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util-optimize.h b/src/util-optimize.h index 78eff1230e..134ee9d037 100644 --- a/src/util-optimize.h +++ b/src/util-optimize.h @@ -24,8 +24,12 @@ * \author Victor Julien */ +#ifndef likely #define likely(expr) __builtin_expect(!!(expr), 1) +#endif +#ifndef unlikely #define unlikely(expr) __builtin_expect(!!(expr), 0) +#endif /** from http://en.wikipedia.org/wiki/Memory_ordering *