Re: Redefinition error while compiling LKM

From: pretorious .
Date: Thu Dec 29 2005 - 06:20:43 EST



and.. why on earth would you need sys/syscall.h ?? (or sys/stat.h for
that matter)



Trying to override certain syscalls (mknod ...)

From: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
To: "pretorious ." <pretorious_i@xxxxxxxxxxx>
CC: linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: Redefinition error while compiling LKM
Date: Thu, 29 Dec 2005 12:02:09 +0100

On Thu, 2005-12-29 at 16:21 +0530, pretorious . wrote:
> hi!
> I am facing problem in compiling an LKM. It seems Inclusion of
> <sys/stat.h> conflicts with definitions in time.h.
>
>
> My linux kernal version is 2.4.21-4.EL
>
>
> #include <linux/kernel.h>
> #include <linux/module.h>
>
> #if CONFIG_MODVERSIONS==1
> #define MODVERSIONS
> #include <linux/modversions.h>
> #endif

this is broken btw
>
> #ifndef KERNEL_VERSION
> #define KERNEL_VERSION(a,b,c) ((a)*65536+(b)*256+(c))
> #endif
>
> #include <linux/slab.h>
> #include <asm/uaccess.h>
> #include <sys/syscall.h>
>
> #include <sys/stat.h>


you cannot use glibc headers in kernel modules. anything in sys/ is a
glibc header.

and.. why on earth would you need sys/syscall.h ?? (or sys/stat.h for
that matter)



_________________________________________________________________
Spice up your IM conversations. New, colorful and animated emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/