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

Matt Helsley matthltc at us.ibm.com
Mon Oct 12 12:38:22 PDT 2009


Extend this change to the rewrite-cr-header.sh script.

Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
Cc: Nathan Lynch <ntl at pobox.com>
---
 rewrite-cr-header.sh |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/rewrite-cr-header.sh b/rewrite-cr-header.sh
index 97f39fc..62ad5b5 100755
--- a/rewrite-cr-header.sh
+++ b/rewrite-cr-header.sh
@@ -42,7 +42,11 @@ fi
 
 COND='#if'
 set -e
-echo '/* AUTOMATICALLY GENERATED by rewrite-cr-header.sh */'
+cat - <<-EOFOEOF
+/* AUTOMATICALLY GENERATED by rewrite-cr-header.sh */
+#ifndef _LINUX_CHECKPOINT_H_
+#include <asm/unistd.h>
+EOFOEOF
 
 #
 # Include non-__KERNEL__ sections of include/linux/checkpoint.h using
@@ -84,4 +88,7 @@ while read UNISTDH ; do
 	sed -e 's/^[[:space:]]*#define[[:space:]]\+__NR_\([^[:space:]]\+\)[[:space:]]\+\([^[:space:]]\+\).*$/#ifndef __NR_\1\n#define __NR_\1 \2\n#endif\n/'
 	COND='#elif'
 done
-echo -e '#else\n#error "Architecture does not have definitons for __NR_(checkpoint|restart)"\n#endif'
+cat - <<-EOFOEOF
+#endif /* arch-specific sections */
+#endif /* _LINUX_CHECKPOINT_H_ */
+EOFOEOF
-- 
1.5.6.3




More information about the Containers mailing list