[CRIU] [PATCH] criu/compat: fixup to criu-dev rebase

Dmitry Safonov dsafonov at virtuozzo.com
Tue Dec 13 05:27:42 PST 2016


Fixes build error:
In file included from /home/travis/build/xemul/criu/criu/arch/x86/include/asm/restorer.h:9:0,
                 from criu/arch/x86/crtools.c:10:
/home/travis/build/xemul/criu/criu/arch/x86/include/asm/compat.h: In function ‘free_compat_syscall_stack’:
/home/travis/build/xemul/criu/criu/arch/x86/include/asm/compat.h:29:3: error: implicit declaration of function ‘pr_err’ [-Werror=implicit-function-declaration]
   pr_err("munmap of compat addr %p failed with %ld", mem, ret);
   ^

I can't include "log.h" in "compat.h", as it's used in PIE and CRIU
both.

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 criu/arch/x86/crtools.c          | 2 +-
 criu/arch/x86/sigaction_compat.c | 5 +++--
 criu/sigframe.c                  | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c
index 119c791d2929..267d486d01d3 100644
--- a/criu/arch/x86/crtools.c
+++ b/criu/arch/x86/crtools.c
@@ -5,6 +5,7 @@
 #include <sys/syscall.h>
 #include <sys/auxv.h>
 
+#include "log.h"
 #include "types.h"
 #include "asm/parasite-syscall.h"
 #include "asm/restorer.h"
@@ -16,7 +17,6 @@
 #include "restorer.h"
 #include <compel/ptrace.h>
 #include "parasite-syscall.h"
-#include "log.h"
 #include "util.h"
 #include "cpu.h"
 #include <compel/plugins/std/syscall-codes.h>
diff --git a/criu/arch/x86/sigaction_compat.c b/criu/arch/x86/sigaction_compat.c
index 0e9e23bddbd3..a7109d91c0f0 100644
--- a/criu/arch/x86/sigaction_compat.c
+++ b/criu/arch/x86/sigaction_compat.c
@@ -1,3 +1,6 @@
+#include "log.h"
+#include "cpu.h"
+
 #include "asm/restorer.h"
 #include <compel/asm/fpu.h>
 #include "asm/string.h"
@@ -10,8 +13,6 @@
 #  define  __NR32_rt_sigaction 174
 # endif
 #endif
-#include "log.h"
-#include "cpu.h"
 
 asm (	"	.pushsection .text				\n"
 	"	.global restore_rt_sigaction			\n"
diff --git a/criu/sigframe.c b/criu/sigframe.c
index b2dd85addb1d..2b5ae7658912 100644
--- a/criu/sigframe.c
+++ b/criu/sigframe.c
@@ -1,5 +1,6 @@
 #include <unistd.h>
 #include <string.h>
+#include "log.h"
 #include "restore.h"
 #include "images/core.pb-c.h"
 
-- 
2.10.2



More information about the CRIU mailing list