Add __rte_pure for __attribute__((pure)) to permit elimination of direct use of __attribute__((pure)) in other libs.
Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> Reviewed-by: Morten Brørup <m...@smartsharesystems.com> --- lib/eal/include/rte_common.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index 298a5c6..b15a5b2 100644 --- a/lib/eal/include/rte_common.h +++ b/lib/eal/include/rte_common.h @@ -137,6 +137,15 @@ #define __rte_weak __attribute__((__weak__)) /** + * Mark a function to be pure. + */ +#ifdef RTE_TOOLCHAIN_MSVC +#define __rte_pure +#else +#define __rte_pure __attribute__((pure)) +#endif + +/** * Force symbol to be generated even if it appears to be unused. */ #ifdef RTE_TOOLCHAIN_MSVC -- 1.8.3.1