From: "pretorious ." <pretorious_i@hotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Redefinition error while compiling LKM
Date: Thu, 29 Dec 2005 16:21:49 +0530 [thread overview]
Message-ID: <BAY23-F21B799C42BAB6D34C0D762F7290@phx.gbl> (raw)
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
#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>
#define CALLOFF 500
MODULE_LICENSE("GPL");
......
......
Inclusion of header file "sys/stat.h" gives variable redefinition error
during compilation.
........
In file included from /usr/include/sys/stat.h:37,
from venky.c:18:
/usr/include/time.h:119: redefinition of `struct timespec'
In file included from /usr/include/sys/stat.h:105,
from venky.c:18:
/usr/include/bits/stat.h:37: redefinition of `struct stat'
......
The Compile string is ::
gcc -O2 -DMODULE -D__KERNEL__ -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -isystem /lib/modules/`uname -r`/build/include -I../ -c
-o test.o test.c
Similar redefinition error message are there when trying to include header
files like sys/types.h
It would be very helpfull if someone would point me in right direction.
Thanks
_________________________________________________________________
Tuff to bluff! Get Abhishek before he gets you! Enter the contest
http://utv.movie-talkies.com/bluffmaster/contest.html
next reply other threads:[~2005-12-29 10:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-29 10:51 pretorious . [this message]
2005-12-29 11:00 ` Al Viro
2005-12-29 11:02 ` Arjan van de Ven
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=BAY23-F21B799C42BAB6D34C0D762F7290@phx.gbl \
--to=pretorious_i@hotmail.com \
--cc=linux-kernel@vger.kernel.org \
/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®