[criu] Fix compilation on FC21

Andrey Vagin avagin at fedoraproject.org
Sat Feb 1 11:52:48 UTC 2014


commit 242347c219f83f5b7082578ccfc799969eb1bbd0
Author: Andrey Vagin <avagin at openvz.org>
Date:   Sat Feb 1 15:46:45 2014 +0400

    Fix compilation on FC21
    
    cr-dump.c: In function 'dump_signal_queue':
    cr-dump.c:1106:33: error: storage size of 'arg' isn't known
      struct ptrace_peeksiginfo_args arg;
                                     ^
    cr-dump.c:1106:33: warning: unused variable 'arg' [-Wunused-variable]

 criu.spec                     |    2 ++
 ptrace_peeksiginfo_args.patch |   26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/criu.spec b/criu.spec
index 33b0326..0dde98f 100644
--- a/criu.spec
+++ b/criu.spec
@@ -8,6 +8,7 @@ Group: System Environment/Base
 License: GPLv2
 URL: http://criu.org/
 Source0: http://download.openvz.org/criu/criu-%{version}.tar.bz2
+Patch0: ptrace_peeksiginfo_args.patch
 
 BuildRequires: protobuf-c-devel asciidoc xmlto
 
@@ -25,6 +26,7 @@ Linux in user-space.
 
 %prep
 %setup -q -n criu-%{version}
+%patch0 -p1
 
 %build
 # %{?_smp_mflags} does not work
diff --git a/ptrace_peeksiginfo_args.patch b/ptrace_peeksiginfo_args.patch
new file mode 100644
index 0000000..1a513c1
--- /dev/null
+++ b/ptrace_peeksiginfo_args.patch
@@ -0,0 +1,26 @@
+diff --git a/include/ptrace.h b/include/ptrace.h
+index 46b6def..9420acd 100644
+--- a/include/ptrace.h
++++ b/include/ptrace.h
+@@ -19,16 +19,17 @@
+ 
+ #ifndef PTRACE_PEEKSIGINFO
+ #define PTRACE_PEEKSIGINFO      0x4209
++
++/* Read signals from a shared (process wide) queue */
++#define PTRACE_PEEKSIGINFO_SHARED       (1 << 0)
++#endif
++
+ struct ptrace_peeksiginfo_args {
+         __u64 off;	/* from which siginfo to start */
+         __u32 flags;
+         __u32 nr;	/* how may siginfos to take */
+ };
+ 
+-/* Read signals from a shared (process wide) queue */
+-#define PTRACE_PEEKSIGINFO_SHARED       (1 << 0)
+-#endif
+-
+ #ifndef PTRACE_GETREGSET
+ # define PTRACE_GETREGSET	0x4204
+ # define PTRACE_SETREGSET	0x4205


More information about the scm-commits mailing list