[CRIU] [PATCH 0/2] Fix compilation on ARM

Tycho Andersen tycho.andersen at canonical.com
Thu Dec 3 09:30:57 PST 2015


Hi Cyrill,

On Thu, Dec 03, 2015 at 08:24:14PM +0300, Cyrill Gorcunov wrote:
> When we run cr-check we assume that the kernel headers may be old
> and don't have all predefined constants needed. So we use our syscalls
> library for that.
> 
> But since commit 5e2ca506e4b02f12c74cc36b8c49711899a2b436 we also
> need to check __NR_ptrace which is missing in our syscalls so
> sysem wide <sys/syscalls.h> has been included. And this cause
> problem on ARM:
> 
>  | In file included from include/syscall.h:5:0,
>  |                  from cr-check.c:27:
>  | include/syscall-codes.h:4:0: error: "__NR_read" redefined [-Werror]
>  |  #define __NR_read 3
>  |  ^
>  | In file included from /usr/include/arm-linux-gnueabihf/sys/syscall.h:24:0,
>  |                  from cr-check.c:17:
>  | /usr/include/arm-linux-gnueabihf/asm/unistd.h:31:0: note: this is the location of the previous definition
>  |  #define __NR_read   (__NR_SYSCALL_BASE+  3)
> 
> Thus define own __NR_ptrace in syscalls and drop system header.

Sorry about that, whole series is:

Acked-by: Tycho Andersen <tycho.andersen at canonical.com>

> 
> === NOTE ===
> 
> 	I need some help in defining this proto for othen than x86
> 	syscalls table. Please guys add ones.

The maintainer of the capsicum linux project showed me a nice syscall
table that he maintains:

http://capsicum-linux.org/syscalls.html

which I started using after Andrey corrected some of my wrong syscall
numbers from previous patches :)

Tycho


More information about the CRIU mailing list