From 397e7e7a4f32a1b0030fc8c5b8311b51189b4062 Mon Sep 17 00:00:00 2001 From: chenxiaoyi Date: Mon, 22 Sep 2025 11:05:50 +0800 Subject: [PATCH] macro: use portable variadic macros The old implementation used a GCC extension related to variadic macros, where a name prepends the ellipsis, which has portability issues. Signed-off-by: chenxiaoyi --- include/nuttx/macro.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nuttx/macro.h b/include/nuttx/macro.h index e5a92e18567..6c38aba4b24 100644 --- a/include/nuttx/macro.h +++ b/include/nuttx/macro.h @@ -51,8 +51,8 @@ /* Expand the arguments */ -#define EXPAND_(x...) x -#define EXPAND(x...) EXPAND_(x) +#define EXPAND_(...) __VA_ARGS__ +#define EXPAND(...) EXPAND_(__VA_ARGS__) /* Reverse the arguments */