[bproc] kernel patch for 2.2.18

Erik Arjan Hendriks erik@hendriks.cx
Tue, 15 May 2001 08:54:40 -0400

On Tue, May 15, 2001 at 01:16:07AM -0500, Simon Hill wrote:
> Hello Erik,
> I've been trying to build 2.2.18 with the bproc-2.2.2 patch on an Alpha,
> but I'm getting errors. The patch goes in fine, but the make fails. I've
> attached the make error ouput. Any suggestions?

I apparently created a circular dependency in the definition of
task_struct.  They moved the definition of kernel_thread in
2.2.17->2.2.18.  The following hack has worked for other people.  A
quick hack around it, would be to move the definition back to where it
was in include/asm-alpha/unistd.h.

That's the following bit:
#include <linux/bproc.h>

extern long __kernel_thread(unsigned long, int (*)(void *), void *);

static inline long kernel_thread(int (*fn)(void *), void * arg, unsigned long fl
        long result;
        result = __kernel_thread(flags | CLONE_VM, fn, arg);
        return result;

Then add a "#include <asm/unistd.h>" line to patch up anything that
finds it missing.

There's probably a nicer answer but that's the one I have right now.

- Erik
Erik Arjan Hendriks          Printed On 100 Percent Recycled Electrons
erik@hendriks.cx                   Contents may settle during shipment