[CRIU] [PATCH 3/3] fix build error under Android NDK/Clang

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


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

it reports:
criu/pie/util-vdso-elf32.c:255:8: error: implicit declaration of function 'ELF32_ST_TYPE' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                        if (ELF_ST_TYPE(sym->st_info) != STT_FUNC &&
                            ^
criu/include/util-vdso.h:72:21: note: expanded from macro 'ELF_ST_TYPE'
                        ^
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64//sysroot/usr/include/linux/elf.h:114:26: note: expanded from macro 'ELF32_ST_TYPE'
                         ^
criu/include/util-vdso.h:72:21: note: expanded from macro 'ELF_ST_TYPE'

comment out these two defines in util-vdso.h, and pass build

Cc: Chen Hu <hu1.chen at intel.com>
Signed-off-by: Zhang Ning <ning.a.zhang at intel.com>
---
 criu/include/util-vdso.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/criu/include/util-vdso.h b/criu/include/util-vdso.h
index 1318a595..7de9e256 100644
--- a/criu/include/util-vdso.h
+++ b/criu/include/util-vdso.h
@@ -68,8 +68,10 @@ struct vdso_maps {
 #define Word_t		Elf32_Word
 #define Dyn_t		Elf32_Dyn
 
+/*
 #define ELF_ST_TYPE	ELF32_ST_TYPE
 #define ELF_ST_BIND	ELF32_ST_BIND
+*/
 
 #else /* CONFIG_VDSO_32 */
 
-- 
2.20.1



More information about the CRIU mailing list