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

Dmitry Safonov 0x7f454c46 at gmail.com
Tue Apr 2 17:32:30 MSK 2019


On Tue, 2 Apr 2019 at 03:44, <ning.a.zhang at intel.com> wrote:
>
> 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>

Reviewed-by: Dmitry Safonov <0x7f454c46 at gmail.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
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu

Thanks,
             Dmitry


More information about the CRIU mailing list