diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h index deb1fd43f25..870665f05c9 100644 --- a/lib/eal/include/rte_bitops.h +++ b/lib/eal/include/rte_bitops.h @@ -1341,6 +1341,7 @@ rte_log2_u64(uint64_t v) #ifdef __cplusplus } +extern "C++" { /* * Since C++ doesn't support generic selection (i.e., _Generic), * function overloading is used instead. Such functions must be @@ -1502,7 +1503,7 @@ __RTE_BIT_OVERLOAD_3R(atomic_, test_and_clear,, bool, unsigned int, nr, int, mem __RTE_BIT_OVERLOAD_4R(atomic_, test_and_assign,, bool, unsigned int, nr, bool, value, int, memory_order) #endif - +} #endif #endif /* _RTE_BITOPS_H_ */