From 4d25e6f59b0cdef57cbd3e910652babe362ea4eb Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Fri, 5 Sep 2014 09:14:57 -0700 Subject: [PATCH] Add conditional compile define for netmap API version < 11 --- docs/CHANGELOG | 1 + src/common/netmap.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index b991bdb8b..53d704ac3 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -1,4 +1,5 @@ 09/05/2014 Version 4.0.5 + - Fix build failure with latest netmap 11 (#123) - Fix unable to use Zero Copy interfaces on PF_RING (#118) - Corrected build for latest version of PF_RING (#81) - Proper error message when vale is unconfigured (#113) diff --git a/src/common/netmap.h b/src/common/netmap.h index f5a0b0654..acdb95ebe 100644 --- a/src/common/netmap.h +++ b/src/common/netmap.h @@ -48,6 +48,7 @@ #ifndef HAVE_NETMAP_NR_REG #define NR_REG_MASK 0xf /* values for nr_flags */ +#if NETMAP_API < 11 enum { NR_REG_DEFAULT = 0, /* backward compat, used in older versions. */ NR_REG_ALL_NIC, NR_REG_SW, @@ -56,6 +57,7 @@ enum { NR_REG_DEFAULT = 0, /* backward compat, used in older versions. */ NR_REG_PIPE_MASTER, NR_REG_PIPE_SLAVE, }; +#endif /* NETMAP_API < 11 */ #endif #ifndef NETMAP_HW_RING