From: Eric Leblond Date: Sun, 30 Sep 2012 14:18:10 +0000 (+0200) Subject: pf-ring: protect definition of (un)likely X-Git-Tag: suricata-1.4beta2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7731cef782bbf53dc1f23b65f852ab50fb254ffa;p=thirdparty%2Fsuricata.git pf-ring: protect definition of (un)likely This patch makes (un)likely declared if and only if they are not declared before. --- 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 *