user-cr: fix powerpc build
PATCH 1/1 user-cr: fix powerpc build
Several warnings and a link error in current build on powerpc:
make SUBARCH=ppc CPPFLAGS=-I$PWD/../linux-2.6.git/usr/include
cc -g -Wall -Wstrict-prototypes -Wno-trigraphs -I../linux/include -I../linux/arch//include -DCHECKPOINT_DEBUG -D__REENTRANT -pthread -DARCH_HAS_CLONE_WITH_PID -I/home/nathanl/devel/user-cr.git/../linux-2.6.git/usr/include -c -o clone_ppc.o clone_ppc.c clone_ppc.c:28: warning: ‘struct target_pid_set’ declared inside parameter list
clone_ppc.c:28: warning: its scope is only this definition or declaration, which is probably not what you wantclone_ppc.c: In function ‘clone_with_pids’:
clone_ppc.c:35: warning: implicit declaration of function ‘__clone_with_pids’clone_ppc.c: At top level:
clone_ppc.c:29: warning: ‘clone_with_pids’ defined but not used
cc -g -Wall -Wstrict-prototypes -Wno-trigraphs -I../linux/include -I../linux/arch//include -DCHECKPOINT_DEBUG -D__REENTRANT -pthread -DARCH_HAS_CLONE_WITH_PID -I/home/nathanl/devel/user-cr.git/../linux-2.6.git/usr/include restart.c clone_ppc.o clone_ppc_.o -lm -o restart/tmp/ccUL0PH0.o: In function `ckpt_fork_child':/home/nathanl/devel/user-cr.git/restart.c:1659: undefined reference to `clone_with_pids'
Declare struct target_pid_set and __clone_with_pids; make clone_with_pids extern.
--- clone_ppc.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
clone_ppc.c +12 -1
@@ -16,6 +16,17 @@#include <sys/syscall.h> #include <asm/unistd.h> +struct target_pid_set ; + +extern int __clone_with_pids (int (*fn)(void *arg), +void *child_stack , +int flags, +void *arg, +void *parent_tid, +void *tls, +void *child_tid, +struct target_pid_set *setp); +/* * libc doesn't support clone_with_pid() yet... * below is arch-dependent code to use the syscall
@@ -24,7 +35,7 @@/* (see: http://lkml.indiana.edu/hypermail/linux/kernel/9604.3/0204.html) */ -static int clone_with_pids (int (*fn)(void *),void *child_stack,int flags, +int clone_with_pids (int (*fn)(void *),void *child_stack,int flags,struct target_pid_set *target_pids,void *arg) {void *parent_tid =NULL ;
Signature · 6 lines
1.6.0.6 _______________________________________________ Containers mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/containers
A message that is not in the archive (sent off-list or not yet received): 1254163434-14196-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org
Applied on ckpt-v18-dev, thanks.
Quoted 45 lines · Nathan Lynch
Several warnings and a link error in current build on powerpc:
make SUBARCH=ppc CPPFLAGS=-I$PWD/../linux-2.6.git/usr/include
cc -g -Wall -Wstrict-prototypes -Wno-trigraphs -I../linux/include -I../linux/arch//include -DCHECKPOINT_DEBUG -D__REENTRANT -pthread -DARCH_HAS_CLONE_WITH_PID -I/home/nathanl/devel/user-cr.git/../linux-2.6.git/usr/include -c -o clone_ppc.oclone_ppc.cclone_ppc.c:28: warning: ‘struct target_pid_set’ declared inside parameter list
clone_ppc.c:28: warning: its scope is only this definition or declaration, which is probably not what you wantclone_ppc.c: In function ‘clone_with_pids’:
clone_ppc.c:35: warning: implicit declaration of function ‘__clone_with_pids’clone_ppc.c: At top level:
clone_ppc.c:29: warning: ‘clone_with_pids’ defined but not used
cc -g -Wall -Wstrict-prototypes -Wno-trigraphs -I../linux/include -I../linux/arch//include -DCHECKPOINT_DEBUG -D__REENTRANT -pthread -DARCH_HAS_CLONE_WITH_PID -I/home/nathanl/devel/user-cr.git/../linux-2.6.git/usr/includerestart.cclone_ppc.o clone_ppc_.o -lm -o restart/tmp/ccUL0PH0.o: In function `ckpt_fork_child':/home/nathanl/devel/user-cr.git/restart.c:1659: undefined reference to `clone_with_pids'Declare struct
target_pid_setand__clone_with_pids; makeclone_with_pidsextern.Signed-off-by Nathan Lynch <[email protected]>--- clone_ppc.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)clone_ppc.c +11
-0@@ -16,6 +16,17 @@#include <sys/syscall.h> #include <asm/unistd.h> +struct target_pid_set ; + +extern int __clone_with_pids (int (*fn)(void *arg), +void *child_stack , +int flags, +void *arg, +void *parent_tid, +void *tls, +void *child_tid, +struct target_pid_set *setp); +/* * libc doesn't support clone_with_pid() yet... * below is arch-dependent code to use the syscall
clone_ppc.c line 41
Quoted 8 lines
clone_ppc.c +1
-1@@ -24,7 +35,7 @@/* (see: http://lkml.indiana.edu/hypermail/linux/kernel/9604.3/0204.html) */ -static int clone_with_pids (int (*fn)(void *),void *child_stack,int flags, +int clone_with_pids (int (*fn)(void *),void *child_stack,int flags,struct target_pid_set *target_pids,void *arg) {void *parent_tid =NULL ;
_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers