The previous fix was for g++ but is broken with gcc: error: flexible array member in otherwise empty struct See http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Zero-Length.html
Let's fix it with #ifdef __cplusplus. Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com> --- lib/librte_ether/rte_ethdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index a253b3f..2280772 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -320,7 +320,9 @@ struct rte_eth_vmdq_dcb_conf { * For future extensions. */ struct rte_eth_txmode { +#ifdef __cplusplus int reserved[]; /* force size of struct to be 0 */ +#endif }; /** -- 1.7.10.4