All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] user-cr: fix powerpc build
@ 2009-09-28 18:43 Nathan Lynch
       [not found] ` <1254163434-14196-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Lynch @ 2009-09-28 18:43 UTC (permalink / raw)
  To: Oren Laadan; +Cc: containers-qjLDD68F18O7TbgM5vRIOg

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 want
clone_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.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
---
 clone_ppc.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/clone_ppc.c b/clone_ppc.c
index 209f00b..09b51b5 100644
--- a/clone_ppc.c
+++ b/clone_ppc.c
@@ -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;
-- 
1.6.0.6

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

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

end of thread, other threads:[~2009-09-29 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-28 18:43 [PATCH] user-cr: fix powerpc build Nathan Lynch
     [not found] ` <1254163434-14196-1-git-send-email-ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
2009-09-29 23:33   ` 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.