lkml.org 
[lkml]   [2005]   [May]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 10 May 2005 07:30:46 +0200 (CEST)
FromGeert Uytterhoeven <>
SubjectRe: Adding a system call to kernel
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 -- geert@linux-m68k.org

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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-10 07:34    [from the cache]
©2003-2008