]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
pf-ring: protect definition of (un)likely
authorEric Leblond <eric@regit.org>
Sun, 30 Sep 2012 14:18:10 +0000 (16:18 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 4 Oct 2012 08:49:35 +0000 (10:49 +0200)
This patch makes (un)likely declared if and only if they are not
declared before.

src/util-optimize.h

index 78eff1230e811330fa3ed1ebc1f6edaf80f05d98..134ee9d03721fb5da267fa3a975351430ee33c04 100644 (file)
  * \author Victor Julien <victor@inliniac.net>
  */
 
+#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
  *