All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix up headers so we can munge them for use by userspace.
@ 2009-10-03  7:10 Matt Helsley
       [not found] ` <1254553859-481-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Helsley @ 2009-10-03  7:10 UTC (permalink / raw)
  To: Oren Laadan; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
 arch/s390/include/asm/checkpoint_hdr.h |    7 +++++--
 arch/x86/include/asm/checkpoint_hdr.h  |    2 --
 include/linux/checkpoint_hdr.h         |    4 ++++
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/s390/include/asm/checkpoint_hdr.h b/arch/s390/include/asm/checkpoint_hdr.h
index b6ea8ce..bc9f624 100644
--- a/arch/s390/include/asm/checkpoint_hdr.h
+++ b/arch/s390/include/asm/checkpoint_hdr.h
@@ -19,8 +19,6 @@
 
 #ifdef __KERNEL__
 #include <asm/processor.h>
-#else
-#include <sys/user.h>
 #endif
 
 #ifdef CONFIG_64BIT
@@ -34,7 +32,12 @@
  * NUM_FPRS defined in <asm/ptrace.h> to be 16
  * NUM_APRS defined in <asm/ptrace.h> to be 16
  * NUM_CR_WORDS defined in <asm/ptrace.h> to be 3
+ *              but is not yet in glibc headers.
  */
+#ifndef NUM_CR_WORDS
+#define NUM_CR_WORDS 3
+#endif
+
 struct ckpt_hdr_cpu {
 	struct ckpt_hdr h;
 	__u64 args[1];
diff --git a/arch/x86/include/asm/checkpoint_hdr.h b/arch/x86/include/asm/checkpoint_hdr.h
index 7a24de5..282bd31 100644
--- a/arch/x86/include/asm/checkpoint_hdr.h
+++ b/arch/x86/include/asm/checkpoint_hdr.h
@@ -34,8 +34,6 @@
 /* i387 structure seen from kernel/userspace */
 #ifdef __KERNEL__
 #include <asm/processor.h>
-#else
-#include <sys/user.h>
 #endif
 
 #ifdef CONFIG_X86_32
diff --git a/include/linux/checkpoint_hdr.h b/include/linux/checkpoint_hdr.h
index f8bd4e1..b318cee 100644
--- a/include/linux/checkpoint_hdr.h
+++ b/include/linux/checkpoint_hdr.h
@@ -10,6 +10,10 @@
  *  distribution for more details.
  */
 
+#ifndef __KERNEL__
+/* In userspace sys/types.h must be included before linux/types.h */
+#include <sys/types.h>
+#endif
 #include <linux/types.h>
 
 #ifdef __KERNEL__
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-14 22:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-03  7:10 [PATCH] Fix up headers so we can munge them for use by userspace Matt Helsley
     [not found] ` <1254553859-481-1-git-send-email-matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-06  2:20   ` Serge E. Hallyn
     [not found]     ` <20091006022027.GA31628-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-08  1:06       ` Matt Helsley
     [not found]         ` <20091008010614.GF18101-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2009-10-14 22:15           ` Oren Laadan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.