Thanks Geert.
You know, I knew I had to do include this, and spent
all weekend trying to figure out where to include
<errno.h>.
But, for some reason, after reading your reply, the
simplicity dawned on me - include it in the user-space
program dummy.
That's what you should have written ;)
Thanks again - it worked!
Jensen
--- Geert Uytterhoeven <[email protected]> wrote:
> On Mon, 9 May 2005, jensen galan wrote:
> > I am trying to add a system call to a 2.4 kernel.
> > It's a simple system call which merely prints the
> > value of xtime. The kernel recompiles OK, and my
> > user-space program (p5_a.c) actually works using
> the
> > added system call when I use syscall() and do not
> > generate a stub. (The 2 versions of my user-space
> > programs are included below). However, when I try
> to
> > generate a stub in my user-space program using
> > _syscall2(), I receive the following compilation
> > error:
> >
> > # gcc -Wall -D__KERNEL__ -I
> > /lib/modules/2.4.28-gentoo-r5/build/include -o
> p5_b
> > p5_b.c
> > /tmp/cc5nBrjZ.o(.text+0x23): In function
> > 'pedagogictime':
> > : undefined reference to 'errno'
> > collect2: ld returned 1 exit status
>
> Please include <errno.h>
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond
> ia32 -- [email protected]
>
> In personal conversations with technical people, I
> call myself a hacker. But
> when I'm talking to journalists I just say
> "programmer" or something like that.
> -- Linus Torvalds
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]