Skip to contentSkip to conversation

cr_test: include unistd.h for syscall numbers

PATCH Applied Nathan Lynch 2 participants 2 messages Sep 16, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cr_test: include unistd.h for syscall numbers

Instead of duplicating the checkpoint/restart/clone_with_pids system call numbers for powerpc in cr.h, just #include asm/unistd.h and remove the #error; the build will fail intelligibly if those constants are undefined.

(also add guards to prevent multiple inclusion)

---
 cr.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
cr.h +5 -2
index f24b7b0..a7dce6a 100644
@@ -1,6 +1,9 @@
 /* AUTOMATICALLY GENERATED by rewrite-cr-header.sh */
 
+#ifndef _LINUX_CHECKPOINT_H_ 
 #define _LINUX_CHECKPOINT_H_ 
+
+#include <asm/unistd.h>
 /*
  *  Generic checkpoint-restart
  *
@@ -90,6 +93,6 @@
 /* x86_64 unsupported. */
 /* x86_64 unsupported. */
 /* xtensa unsupported. */
-#else
-#error "Architecture does not have definitons for __NR_(checkpoint|restart)"
+#endif
+
 #endif
Signature · 1 line
1.6.0.6

A message that is not in the archive (sent off-list or not yet received): 1253091924-15309-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 8 lines · Nathan Lynch

Instead of duplicating the checkpoint/restart/clone_with_pids system call numbers for powerpc in cr.h, just #include asm/unistd.h and remove the #error; the build will fail intelligibly if those constants are undefined.

(also add guards to prevent multiple inclusion)

Applied.

thanks,
-serge

Quoted 29 lines
---
 cr.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
cr.h +5 -2
index f24b7b0..a7dce6a 100644
@@ -1,6 +1,9 @@
 /* AUTOMATICALLY GENERATED by rewrite-cr-header.sh */
 
+#ifndef _LINUX_CHECKPOINT_H_ 
 #define _LINUX_CHECKPOINT_H_ 
+
+#include <asm/unistd.h>
 /*
  *  Generic checkpoint-restart
  *
@@ -90,6 +93,6 @@
 /* x86_64 unsupported. */
 /* x86_64 unsupported. */
 /* xtensa unsupported. */
-#else
-#error "Architecture does not have definitons for __NR_(checkpoint|restart)"
+#endif
+
 #endif
Signature · 1 line
1.6.0.6