[CRIU] [PATCH 72/78] criu: Move ptrace_peeksiginfo_args into separate header

Cyrill Gorcunov gorcunov at openvz.org
Mon Nov 7 08:36:57 PST 2016


The rest is to be moved into compel, while this particular
strucure is only needed by criu.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/cr-check.c              |  1 +
 criu/cr-dump.c               |  1 +
 criu/include/ptrace-compat.h | 16 ++++++++++++++++
 criu/include/ptrace.h        |  9 ---------
 4 files changed, 18 insertions(+), 9 deletions(-)
 create mode 100644 criu/include/ptrace-compat.h

diff --git a/criu/cr-check.c b/criu/cr-check.c
index 0422860c1ce8..cffb5611e1c0 100644
--- a/criu/cr-check.c
+++ b/criu/cr-check.c
@@ -37,6 +37,7 @@
 #include "mount.h"
 #include "tty.h"
 #include "ptrace.h"
+#include "ptrace-compat.h"
 #include "kerndat.h"
 #include "timerfd.h"
 #include "util.h"
diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index a92fd5551530..62dd97eccbc6 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -43,6 +43,7 @@
 #include "servicefd.h"
 #include "string.h"
 #include "ptrace.h"
+#include "ptrace-compat.h"
 #include "util.h"
 #include "namespaces.h"
 #include "image.h"
diff --git a/criu/include/ptrace-compat.h b/criu/include/ptrace-compat.h
new file mode 100644
index 000000000000..f6cc8b932588
--- /dev/null
+++ b/criu/include/ptrace-compat.h
@@ -0,0 +1,16 @@
+#ifndef __CR_PTRACE_ARCH_H__
+#define __CR_PTRACE_ARCH_H__
+
+#include <linux/types.h>
+#include <sys/ptrace.h>
+#include "config.h"
+
+#ifndef CONFIG_HAS_PTRACE_PEEKSIGINFO
+struct ptrace_peeksiginfo_args {
+        __u64 off;	/* from which siginfo to start */
+        __u32 flags;
+        __u32 nr;	/* how may siginfos to take */
+};
+#endif
+
+#endif /* __CR_PTRACE_ARCH_H__ */
diff --git a/criu/include/ptrace.h b/criu/include/ptrace.h
index af9ced973ecc..e3f3374d500b 100644
--- a/criu/include/ptrace.h
+++ b/criu/include/ptrace.h
@@ -5,7 +5,6 @@
 #include <sys/ptrace.h>
 
 #include "types.h"
-#include "config.h"
 
 /* some constants for ptrace */
 #ifndef PTRACE_SEIZE
@@ -31,14 +30,6 @@
 #define PTRACE_PEEKSIGINFO_SHARED       (1 << 0)
 #endif
 
-#ifndef CONFIG_HAS_PTRACE_PEEKSIGINFO
-struct ptrace_peeksiginfo_args {
-        __u64 off;	/* from which siginfo to start */
-        __u32 flags;
-        __u32 nr;	/* how may siginfos to take */
-};
-#endif
-
 #ifndef PTRACE_GETREGSET
 # define PTRACE_GETREGSET	0x4204
 # define PTRACE_SETREGSET	0x4205
-- 
2.7.4



More information about the CRIU mailing list