From: Tyler Retzlaff Date: Wed, 24 Mar 2021 04:26:51 +0000 (-0700) Subject: eal: do not redefine asm keyword in C++ X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7498c2d74ee9d81f2e4f75dcce8390fdf9c800da;p=dpdk.git eal: do not redefine asm keyword in C++ C++ forbids redefining a keyword as a macro. The keyword asm is conditionally-supported and implementation defined, but it seems our best guess. In C, if asm does not exist, it is defined as __asm__ which is a GNU extension. Signed-off-by: Tyler Retzlaff Signed-off-by: Thomas Monjalon --- diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h index 1b630baf16..d5a32c66a5 100644 --- a/lib/librte_eal/include/rte_common.h +++ b/lib/librte_eal/include/rte_common.h @@ -31,9 +31,11 @@ extern "C" { #define typeof __typeof__ #endif +#ifndef __cplusplus #ifndef asm #define asm __asm__ #endif +#endif /** C extension macro for environments lacking C11 features. */ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L