[CRIU] [V2 1/6] Android NDK: elf.h missing defines

ning.a.zhang at intel.com ning.a.zhang at intel.com
Tue Apr 2 05:42:59 MSK 2019


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

in Android NDK, <elf.h> doesn't has define for:
NT_X86_XSTATE
NT_PRSTATUS

so add these defines to pass compile.

NOTE: add <linux/elf.h> will have more build errors

Cc: Chen Hu <hu1.chen at intel.com>
Signed-off-by: Zhang Ning <ning.a.zhang at intel.com>
---
 compel/arch/x86/src/lib/infect.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/compel/arch/x86/src/lib/infect.c b/compel/arch/x86/src/lib/infect.c
index 9cb5d82e..cb3e7759 100644
--- a/compel/arch/x86/src/lib/infect.c
+++ b/compel/arch/x86/src/lib/infect.c
@@ -20,6 +20,13 @@
 #include "infect-priv.h"
 #include "log.h"
 
+#ifndef NT_X86_XSTATE
+#define NT_X86_XSTATE	0x202		/* x86 extended state using xsave */
+#endif
+#ifndef NT_PRSTATUS
+#define NT_PRSTATUS	1		/* Contains copy of prstatus struct */
+#endif
+
 /*
  * Injected syscall instruction
  */
-- 
2.20.1



More information about the CRIU mailing list