[CRIU] [PATCH 2/3] fix build error under newer version Clang

ning.a.zhang at intel.com ning.a.zhang at intel.com
Fri Mar 29 08:45:22 MSK 2019


From: Zhang Ning <ning.a.zhang at intel.com>

with Android P's Clang versoin: 6.0.2, and Android NDK's Clang version 8.0.2

Clang will report below error:
criu/compel/include/uapi/compel/sigframe-common.h:55:34: error: expected member name or ';' after declaration specifiers
        int                     __unused[32 - (sizeof (k_rtsigset_t) / sizeof (int))];
        ~~~                             ^

it takes __unused as an attribute, not a varible, chang to _unused, pass compile.

Cc: Chen Hu <hu1.chen at intel.com>
Signed-off-by: Zhang Ning <ning.a.zhang at intel.com>
---
 compel/include/uapi/sigframe-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compel/include/uapi/sigframe-common.h b/compel/include/uapi/sigframe-common.h
index 0796bb37..e35c8655 100644
--- a/compel/include/uapi/sigframe-common.h
+++ b/compel/include/uapi/sigframe-common.h
@@ -52,7 +52,7 @@ struct rt_ucontext {
 	rt_stack_t		uc_stack;
 	struct rt_sigcontext	uc_mcontext;
 	k_rtsigset_t		uc_sigmask;	/* mask last for extensibility */
-	int                     __unused[32 - (sizeof (k_rtsigset_t) / sizeof (int))];
+	int                     _unused[32 - (sizeof (k_rtsigset_t) / sizeof (int))];
 	unsigned long           uc_regspace[128] __attribute__((aligned(8)));
 };
 
-- 
2.20.1



More information about the CRIU mailing list