[CRIU] [PATCH] criu: arm -- Use conditional syscalls where needed

Cyrill Gorcunov gorcunov at openvz.org
Wed Mar 16 07:05:19 PDT 2016


We're using general syscall-codes.h in criu itself
so make sure the headers we include do not override
system headers definitions.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/arch/aarch64/include/asm/syscall-aux.h | 4 +++-
 criu/arch/arm/include/asm/syscall-aux.h     | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/criu/arch/aarch64/include/asm/syscall-aux.h b/criu/arch/aarch64/include/asm/syscall-aux.h
index 814c7a9dddc0..6272bf3a82fd 100644
--- a/criu/arch/aarch64/include/asm/syscall-aux.h
+++ b/criu/arch/aarch64/include/asm/syscall-aux.h
@@ -1 +1,3 @@
-#define __NR_openat 56
+#ifndef __NR_openat
+# define __NR_openat 56
+#endif
diff --git a/criu/arch/arm/include/asm/syscall-aux.h b/criu/arch/arm/include/asm/syscall-aux.h
index ec8c2d38352a..b3bb2247a68c 100644
--- a/criu/arch/arm/include/asm/syscall-aux.h
+++ b/criu/arch/arm/include/asm/syscall-aux.h
@@ -1,4 +1,6 @@
-#define __NR_mmap2 192
+#ifndef __NR_mmap2
+# define __NR_mmap2 192
+#endif
 
 #define __ARM_NR_BASE                   0x0f0000
 #define __ARM_NR_breakpoint             (__ARM_NR_BASE+1)
-- 
2.5.0



More information about the CRIU mailing list