[PATCH v2 1/3] eal: provide type to per lcore macro

Tyler Retzlaff roretzla at linux.microsoft.com
Wed Jan 3 00:45:00 CET 2024


Adjust the use of per lcore macro to provide type as the first argument
as to not require __typeof__ during expansion.

Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
 lib/eal/common/eal_common_errno.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index b30e2f0..fff8c1f 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -28,7 +28,7 @@
 	static const char *sep = "";
 #endif
 #define RETVAL_SZ 256
-	static RTE_DEFINE_PER_LCORE(char[RETVAL_SZ], retval);
+	static RTE_DEFINE_PER_LCORE(char, retval[RETVAL_SZ]);
 	char *ret = RTE_PER_LCORE(retval);
 
 	/* since some implementations of strerror_r throw an error
-- 
1.8.3.1



More information about the dev mailing list