Skip to content

Commit

Permalink
mbuf: add C++ include guard for dynamic fields header
Browse files Browse the repository at this point in the history
[ upstream commit 397fb6a ]

The header was missing the extern "C" directive which causes name
mangling of functions by C++ compilers, leading to linker errors
complaining of undefined references to these functions.

Fixes: 4958ca3 ("mbuf: support dynamic fields and flags")

Signed-off-by: Ashish Sadanandan <ashish.sadanandan@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
  • Loading branch information
praetorian20 authored and cpaelzer committed Feb 3, 2021
1 parent 3f33f50 commit ce45afa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/librte_mbuf/rte_mbuf_dyn.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
*/

#include <sys/types.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* Maximum length of the dynamic field or flag string.
*/
Expand Down Expand Up @@ -250,4 +255,8 @@ void rte_mbuf_dyn_dump(FILE *out);
#define RTE_MBUF_DYNFIELD_METADATA_NAME "rte_flow_dynfield_metadata"
#define RTE_MBUF_DYNFLAG_METADATA_NAME "rte_flow_dynflag_metadata"

#ifdef __cplusplus
}
#endif

#endif /* _RTE_MBUF_DYN_H_ */

0 comments on commit ce45afa

Please sign in to comment.