[dpdk-dev] [PATCH v2 1/3] eal: fix keep alive header for C++
Remy Horton
remy.horton at intel.com
Tue Feb 16 11:16:35 CET 2016
Suspect this will introduce an extra indirection and call/return into
the generated code, but can't think of any alternative that doesn't
potentially break source compatibility..
On 16/02/2016 07:14, Thomas Monjalon wrote:
> When built in a C++ application, the keepalive include fails:
>
> rte_keepalive.h:142:41: error: ‘ALIVE’ was not declared in this scope
> keepcfg->state_flags[rte_lcore_id()] = ALIVE;
> ^
> C++ requires to use a scope operator to access an enum inside a struct.
> There was also a namespace issue for the values (no RTE prefix).
> The solution is to move the struct and related code out of the header file.
>
> Fixes: 75583b0d1efd ("eal: add keep alive monitoring")
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
Acked-by: Remy Horton <remy.horton at intel.com>
More information about the dev
mailing list