mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: "pretorious ." <pretorious_i@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Redefinition error while compiling LKM
Date: Thu, 29 Dec 2005 12:02:09 +0100	[thread overview]
Message-ID: <1135854129.2935.13.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <BAY23-F21B799C42BAB6D34C0D762F7290@phx.gbl>

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)



  parent reply	other threads:[~2005-12-29 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-29 10:51 pretorious .
2005-12-29 11:00 ` Al Viro
2005-12-29 11:02 ` Arjan van de Ven [this message]
2005-12-29 11:21   ` pretorious .
2005-12-29 11:46     ` Alexander Shishckin
2005-12-29 11:49     ` Arjan van de Ven
2005-12-29 12:14       ` Alexander Shishckin
2005-12-29 12:16         ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1135854129.2935.13.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pretorious_i@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®