[CRIU] [PATCH] Move headers around to fix issues on custom-built glibc

Nikolay Borisov kernel at kyup.com
Tue Aug 16 08:13:34 PDT 2016


restorer.h eventually includes fcntl-linux.h system file, which
indiscriminately defines F_SETPIPE_SZ/F_GETPIPE_SZ. But those
are also defined by CRIU's own headers in config-base.h. The latter
contains ifdef guards, however in arch/x86/crtools.c it's included
after restorer.h which causes gcc warnings for macro redefinition.

Fix this by reordering the 2 headers, ensuring the ifdef guards in 
config-base.h actually work. 

Signed-off-by: Nikolay Borisov <kernel at kyup.com>
---
 criu/arch/x86/crtools.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c
index 51eab133f269..54ccf8465f7f 100644
--- a/criu/arch/x86/crtools.c
+++ b/criu/arch/x86/crtools.c
@@ -11,9 +11,9 @@
 
 #include "cr_options.h"
 #include "compiler.h"
+#include "restorer.h"
 #include "ptrace.h"
 #include "parasite-syscall.h"
-#include "restorer.h"
 #include "log.h"
 #include "util.h"
 #include "cpu.h"
-- 
2.5.0



More information about the CRIU mailing list