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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Matt Helsley <matthltc@xxxxxxxxxx>
Cc: Nathan Lynch <ntl@xxxxxxxxx>
---
 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


_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux